Bug 1051056: The REST API needs to be versioned so that new changes can be made that do not break compatibility

- Fix issue where PUT requests were treated as GET and failed when updating a bug, etc.


git-svn-id: svn://10.0.0.236/trunk@265918 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2015-04-10 15:45:53 +00:00
parent 45d24e9f43
commit 86ee6ce5c4
3 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
9372 9373

View File

@ -1 +1 @@
a6d74986bd7b96aa41624ed407a46f7f63eadd55 06da34e74687de919804c87c8d5e15edbc570522

View File

@ -260,7 +260,8 @@ sub _params_check {
} }
} }
if ($self->request->method eq 'POST') { if ($self->request->method eq 'POST'
|| $self->request->method eq 'PUT') {
# CSRF is possible via XMLHttpRequest when the Content-Type header # CSRF is possible via XMLHttpRequest when the Content-Type header
# is not application/json (for example: text/plain or # is not application/json (for example: text/plain or
# application/x-www-form-urlencoded). # application/x-www-form-urlencoded).