]> granicus.if.org Git - php/commitdiff
Fix bug #67587: Redirection loop on nginx with FPM
authorChristian Weiske <cweiske@cweiske.de>
Tue, 8 Jul 2014 16:59:30 +0000 (18:59 +0200)
committerStanislav Malyshev <stas@php.net>
Tue, 8 Jul 2014 19:53:45 +0000 (12:53 -0700)
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;

NEWS
ext/phar/phar_object.c

diff --git a/NEWS b/NEWS
index 2ae5d7ab90e3a6949d512c00ea659ca0fff6bad4..ff025e142a477ec48bb29b1d0b87323484256d23 100644 (file)
--- 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)
 
index 8e276857596f30eacf61de6621a53b6956d22127..a021200fda528c9e3d1af2247dcc98f807ac33a9 100644 (file)
@@ -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]) {