Change post-commit webhooks to issue PUTs instead of POST requests

and generalize the HTTP header name for the auth digest; introduce
an option to restore the old behaviour and document that; place a
big warning in NEWS.mdtext about this change.

This change has been sponsored by Scilab.
This commit is contained in:
Thomas Keller
2011-09-26 01:36:04 +02:00
parent 7ff298af79
commit 920432025f
6 changed files with 46 additions and 5 deletions

View File

@@ -594,6 +594,10 @@ class IDF_Views_Project
'mtn' => __('monotone'),
);
$repository_type = $options[$scm];
$hook_request_method = 'PUT';
if (Pluf::f('webhook_processing','') === 'compat') {
$hook_request_method = 'POST';
}
return Pluf_Shortcuts_RenderToResponse('idf/admin/source.html',
array(
'remote_svn' => $remote_svn,
@@ -603,6 +607,7 @@ class IDF_Views_Project
'page_title' => $title,
'form' => $form,
'hookkey' => $prj->getWebHookKey(),
'hook_request_method' => $hook_request_method,
),
$request);
}