]> 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)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 8 Jul 2014 17:03:26 +0000 (19:03 +0200)
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;

ext/phar/phar_object.c

index 75aadfbc540b9929b0af563e365990c69b1ca315..b198bc2fd16846609a0d7377cd0a24459a2aeb81 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]) {