Added workaround for Firefox not sending LINK in uppercase what then is denied by nginx.

More info: http://stackoverflow.com/questions/9645037/nginx-rejects-custom-http-methods-if-not-all-upper-case
This commit is contained in:
Simon Schick 2014-03-18 10:52:42 +01:00 committed by William DURAND
parent c6741d5710
commit 4fa50ebe53

View File

@ -386,6 +386,12 @@
endpoint = $('#api_endpoint').val(); endpoint = $('#api_endpoint').val();
} }
// Workaround for Firefox bug and a thereby resulting nginx incompatibility
if (method == "LINK") {
method = "POST";
params._method = "LINK";
}
// prepare final parameters // prepare final parameters
var body = {}; var body = {};
if(bodyFormat == 'json' && method != 'GET') { if(bodyFormat == 'json' && method != 'GET') {