Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  Fixed bug #51918 Phar::webPhar() does not handle requests sent through PUT and DELETE method
This commit is contained in:
Anatol Belski 2017-05-02 14:46:15 +02:00
commit 64adba3b3f

View File

@ -573,7 +573,18 @@ PHP_METHOD(Phar, webPhar)
}
/* retrieve requested file within phar */
if (!(SG(request_info).request_method && SG(request_info).request_uri && (!strcmp(SG(request_info).request_method, "GET") || !strcmp(SG(request_info).request_method, "POST")))) {
if (!(SG(request_info).request_method
&& SG(request_info).request_uri
&& (!strcmp(SG(request_info).request_method, "GET")
|| !strcmp(SG(request_info).request_method, "POST")
|| !strcmp(SG(request_info).request_method, "DELETE")
|| !strcmp(SG(request_info).request_method, "HEAD")
|| !strcmp(SG(request_info).request_method, "OPTIONS")
|| !strcmp(SG(request_info).request_method, "PATCH")
|| !strcmp(SG(request_info).request_method, "PUT")
)
)
) {
return;
}