php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #71379
Patch add-balancer-support-v2 revision 2016-01-15 04:01 UTC by matt at haught dot org
Patch add-balancer-support revision 2016-01-15 03:59 UTC by matt at haught dot org

Patch add-balancer-support-v2 for FPM related Bug #71379

Patch version 2016-01-15 04:01 UTC

Return to Bug #71379 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: matt@haught.org

diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index b9c7e0b..c891db2 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1092,11 +1092,16 @@ static void init_request_info(void)
 				memmove(env_script_filename, p, strlen(p) + 1);
 				apache_was_here = 1;
 			}
+		}
+
+		if (env_server_software &&
+			strncmp(env_server_software, "Apache", sizeof("Apache") - 1) == 0) {
 			/* ignore query string if sent by Apache (RewriteRule) */
-			p = strchr(env_script_filename, '?');
+			char *p = strchr(env_script_filename, '?');
 			if (p) {
 				*p =0;
 			}
+			apache_was_here = 1;
 		}
 
 		if (CGIG(fix_pathinfo)) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 13:01:29 2024 UTC