From: foobar Date: Fri, 11 Feb 2005 02:06:48 +0000 (+0000) Subject: Revert this patch X-Git-Tag: php-5.0.4RC1~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d01de96f9a419a0e790e02305b88ccd3ee662363;p=php Revert this patch --- diff --git a/NEWS b/NEWS index 7a02d2cbc1..933bedc2c0 100644 --- a/NEWS +++ b/NEWS @@ -108,8 +108,6 @@ PHP NEWS property access). (Dmitry) - Fixed bug #28324 (HTTP_SESSION_VARS appear when register_long_arrays is Off). (Tony) -- Fixed bug #28227 (PHP CGI depends upon non-standard SCRIPT_FILENAME). - (lukem at NetBSD dot org) - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). (chris at ex-parrot dot com) - Fixed bug #28041 (SOAP HTTP Digest Access Authentication). (Dmitry) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index bd0bfebac7..f06ac1a643 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -661,19 +661,8 @@ static void init_request_info(TSRMLS_D) { char *env_script_filename = sapi_cgibin_getenv("SCRIPT_FILENAME",0 TSRMLS_CC); char *env_path_translated = sapi_cgibin_getenv("PATH_TRANSLATED",0 TSRMLS_CC); - char *env_script_name = sapi_cgibin_getenv("SCRIPT_NAME", 0 TSRMLS_CC); char *script_path_translated = env_script_filename; - /* - * CGI/1.1, as documented at: http://cgi-spec.golux.com/ - * mentions SCRIPT_NAME but not SCRIPT_FILENAME. - */ - if (!script_path_translated && env_script_name && *env_script_name == '/') { - env_script_filename = _sapi_cgibin_putenv("SCRIPT_FILENAME",(env_script_name + 1) TSRMLS_CC); - - script_path_translated = env_script_filename; - } - #if !DISCARD_PATH /* some broken servers do not have script_filename or argv0 an example, IIS configured in some ways. then they do more @@ -701,6 +690,7 @@ static void init_request_info(TSRMLS_D) char *content_length = sapi_cgibin_getenv("CONTENT_LENGTH",0 TSRMLS_CC); char *content_type = sapi_cgibin_getenv("CONTENT_TYPE",0 TSRMLS_CC); char *env_path_info = sapi_cgibin_getenv("PATH_INFO",0 TSRMLS_CC); + char *env_script_name = sapi_cgibin_getenv("SCRIPT_NAME",0 TSRMLS_CC); #if ENABLE_PATHINFO_CHECK struct stat st; char *env_redirect_url = sapi_cgibin_getenv("REDIRECT_URL",0 TSRMLS_CC);