com php-src: Fix bug #67587: Redirection loop on nginx with FPM: ext/phar/phar_object.c
| From: | Stanislav Malyshev | Date: | Tue, 08 Jul 2014 19:54:57 +0000 |
| Subject: | com php-src: Fix bug #67587: Redirection loop on nginx with FPM: ext/phar/phar_object.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79341@lists.php.net to get a copy of this message | ||
Commit: e65e013e15f49d82ede44af8bdd52c27c0cd8274
Author: Christian Weiske <cweiske@cweiske.de> Tue, 8 Jul 2014 18:59:30 +0200
Committer: Stanislav Malyshev <stas@php.net> Tue, 8 Jul 2014 12:54:57 -0700
Parents: b9ead7c67db61ee294e3a0d2551c31087237b070
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e65e013e15f49d82ede44af8bdd52c27c0cd8274
Log:
Fix bug #67587: Redirection loop on nginx with FPM
Redirection will work correctly as long as PATH_INFO is available,
e.g. via the following nginx configuration:
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
Bugs:
https://bugs.php.net/67587
Changed paths:
M ext/phar/phar_object.c
Diff:
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 75aadfb..b198bc2 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -606,6 +606,7 @@ PHP_METHOD(Phar, webPhar)
}
if ((strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 &&
!strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1))
+ || (strlen(sapi_module.name) == sizeof("fpm-fcgi")-1 &&
!strncmp(sapi_module.name, "fpm-fcgi", sizeof("fpm-fcgi")-1))
|| (strlen(sapi_module.name) == sizeof("cgi")-1 && !strncmp(sapi_module.name,
"cgi", sizeof("cgi")-1))) {
if (PG(http_globals)[TRACK_VARS_SERVER]) {