1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00

Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm the SCRIPT_FILENAME may contains the QUERY_STRING.
This commit is contained in:
Remi Collet
2013-04-30 09:02:59 +02:00

View File

@@ -1098,7 +1098,7 @@ static void init_request_info(TSRMLS_D)
#define APACHE_PROXY_FCGI_PREFIX "proxy:fcgi://"
/* Fix proxy URLs in SCRIPT_FILENAME generated by Apache mod_proxy_fcgi:
* proxy:fcgi://localhost:9000/some-dir/info.php/test
* proxy:fcgi://localhost:9000/some-dir/info.php/test?foo=bar
* should be changed to:
* /some-dir/info.php/test
* See: http://bugs.php.net/bug.php?id=54152
@@ -1118,6 +1118,11 @@ static void init_request_info(TSRMLS_D)
memmove(env_script_filename, p, strlen(p) + 1);
apache_was_here = 1;
}
/* ignore query string if sent by Apache (RewriteRule) */
p = strchr(env_script_filename, '?');
if (p) {
*p =0;
}
}
if (CGIG(fix_pathinfo)) {