dmitry Wed Sep 5 08:26:32 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/sapi/cgi cgi_main.c Log: Fixed bug #42523 (PHP_SELF duplicates path) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.927&r2=1.2027.2.547.2.928&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.927 php-src/NEWS:1.2027.2.547.2.928 --- php-src/NEWS:1.2027.2.547.2.927 Tue Sep 4 18:51:48 2007 +++ php-src/NEWS Wed Sep 5 08:26:31 2007 @@ -9,6 +9,7 @@ - Upgraded PCRE to version 7.3 (Nuno) - Added optional parameter $provide_object to debug_backtrace(). (Sebastian) +- Fixed bug #42523 (PHP_SELF duplicates path). (Dmitry) - Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on 64-bit PHP). (Derick) - Fixed bug #42506 (php_pgsql_convert() timezone parse bug) (nonunnet at http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.47&r2=1.267.2.15.2.48&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.47 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.48 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.47 Fri Aug 31 12:17:52 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Sep 5 08:26:32 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.47 2007/08/31 12:17:52 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.48 2007/09/05 08:26:32 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -778,6 +778,21 @@ char *env_redirect_url = sapi_cgibin_getenv("REDIRECT_URL", sizeof("REDIRECT_URL")-1 TSRMLS_CC); char *env_document_root = sapi_cgibin_getenv("DOCUMENT_ROOT", sizeof("DOCUMENT_ROOT")-1 TSRMLS_CC); + /* Hack for buggy IIS that sets incorrect PATH_INFO */ + char *env_server_software = sapi_cgibin_getenv("SERVER_SOFTWARE", sizeof("SERVER_SOFTWARE")-1 TSRMLS_CC); + if (env_server_software && + env_script_name && + env_path_info && + strncmp(env_server_software, "Microsoft-IIS", sizeof("Microsoft-IIS")-1) == 0 && + strncmp(env_path_info, env_script_name, strlen(env_script_name)) == 0) { + env_path_info = _sapi_cgibin_putenv("ORIG_PATH_INFO", env_path_info TSRMLS_CC); + env_path_info += strlen(env_script_name); + if (*env_path_info == 0) { + env_path_info = NULL; + } + env_path_info = _sapi_cgibin_putenv("PATH_INFO", env_path_info TSRMLS_CC); + } + if (CGIG(fix_pathinfo)) { char *real_path = NULL; char *orig_path_translated = env_path_translated;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php