diff options
| author | Sterling Hughes <sterling@php.net> | 2001-05-01 03:48:27 +0000 | 
|---|---|---|
| committer | Sterling Hughes <sterling@php.net> | 2001-05-01 03:48:27 +0000 | 
| commit | ba49860cc859bdbb83b739068018beea350d2113 (patch) | |
| tree | e4f0213f77f7ea66eeacd02e3f46f560711e9b72 | |
| parent | 11961e658529725ffd4fba5ad9a40648e986ae0b (diff) | |
| download | php-git-ba49860cc859bdbb83b739068018beea350d2113.tar.gz | |
fix for bug 6491, http://www.php.net/bugs.php?id=6491, removes a bit of
(what I think is) broken logic.
#  This is as discussed on the mailing list previously.  This change
#  does fix the problem, however, the extra code was in there for a
#  reason (I'm guessing :), i'm ready to revert this patch in a jiffy
#  if someone has a good reason why that (just removed) extra logic
#  should be in there.
| -rw-r--r-- | sapi/cgi/cgi_main.c | 23 | 
1 files changed, 0 insertions, 23 deletions
| diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index fd8a666a39..925688eb58 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -156,30 +156,7 @@ static void sapi_cgi_register_variables(zval *track_vars_array ELS_DC SLS_DC PLS  	php_import_environment_variables(track_vars_array ELS_CC PLS_CC);  	/* Build the special-case PHP_SELF variable for the CGI version */ -#if FORCE_CGI_REDIRECT  	php_register_variable("PHP_SELF", (SG(request_info).request_uri ? SG(request_info).request_uri:""), track_vars_array ELS_CC PLS_CC); -#else -	{ -		char *sn; -		char *val; -		int l=0; - -		sn = getenv("SCRIPT_NAME"); -		pi = SG(request_info).request_uri; -		if (sn) -			l += strlen(sn); -		if (pi) -			l += strlen(pi); -		if (pi && sn && !strcmp(pi, sn)) { -			l -= strlen(pi); -			pi = NULL; -		} -		val = emalloc(l + 1); -		sprintf(val, "%s%s", (sn ? sn : ""), (pi ? pi : ""));	/* SAFE */ -		php_register_variable("PHP_SELF", val, track_vars_array ELS_CC PLS_CC); -		efree(val); -	} -#endif  } | 
