php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch fpm_main-script_name.patch for FPM related Bug #65641Patch version 2014-04-29 14:12 UTC Return to Bug #65641 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: rainer.jung@kippdata.de--- sapi/fpm/fpm/fpm_main.c 2013-02-19 02:35:36.000000000 +0100 +++ sapi/fpm/fpm/fpm_main.c 2014-04-29 16:02:23.038294000 +0200 @@ -1194,8 +1194,20 @@ char *path_info; if (apache_was_here) { /* recall that PATH_INFO won't exist */ + int offset; + char *tmp_str; path_info = script_path_translated + ptlen; tflag = (slen != 0 && (!orig_path_info || strcmp(orig_path_info, path_info) != 0)); + offset = strlen(env_script_name) - strlen(path_info); + if (strcmp(env_script_name + offset, path_info) == 0) { + tmp_str = (char *) emalloc(offset + 1); + memcpy(tmp_str, env_script_name, offset); + tmp_str[offset] = '\0'; + if (!orig_script_name || !*orig_script_name) { + orig_script_name = env_script_name; + } + env_script_name = tmp_str; + } } else { path_info = env_path_info ? env_path_info + pilen - slen : NULL; tflag = (orig_path_info != path_info); |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Nov 21 16:01:29 2024 UTC |