Error 500: Server Error
Bad request: [PATCH]
static int is_valid_http_method(const char *method) {
return !strcmp(method, "GET") || !strcmp(method, "POST") ||
!strcmp(method, "HEAD") || !strcmp(method, "CONNECT") ||
!strcmp(method, "PUT") || !strcmp(method, "DELETE") ||
!strcmp(method, "OPTIONS") || !strcmp(method, "PROPFIND")
|| !strcmp(method, "MKCOL")
;
}
--
You received this message because you are subscribed to the Google Groups "PHP Desktop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpdesktop+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phpdesktop.
For more options, visit https://groups.google.com/d/optout.
i've switched to put method ,
and also i'm getting Response Error 401 Unauthorized when using PUT or DELETE
To view this discussion on the web visit https://groups.google.com/d/msgid/phpdesktop/c99ac8b5-b22e-40f6-8a1a-8a9a4b7ecc0f%40googlegroups.com.
in ajax method:
$.ajax({.....
headers:{'X-HTTP-Method-Override': 'PUT'},
.....});
in PHP:
$_SERVER["REQUEST_METHOD"] =(isset($_SERVER["HTTP_X_HTTP_METHOD_OVERRIDE"])?$_SERVER["HTTP_X_HTTP_METHOD_OVERRIDE"]:$_SERVER["REQUEST_METHOD"]);