com php-src: Fix bug #67587: Redirection loop on nginx with FPM: NEWS ext/phar/phar_object.c

From: Date: Tue, 08 Jul 2014 19:53:45 +0000
Subject: com php-src: Fix bug #67587: Redirection loop on nginx with FPM: NEWS ext/phar/phar_object.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79340@lists.php.net to get a copy of this message
Commit: 0bf50a8302af94357595a21877e224fa42729e25 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:53:45 -0700 Parents: d472434ea05f35926e1492afd9282e6db402b52c Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0bf50a8302af94357595a21877e224fa42729e25 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 NEWS M ext/phar/phar_object.c Diff: diff --git a/NEWS b/NEWS index 2ae5d7a..ff025e1 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ PHP NEWS . Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756), which affected builds against libpq < 7.3. (Adam) +- Phar: + . Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske) + - Streams: . Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 8e27685..a021200 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]) {

« previous php.cvs (#79340) next »