Re: cvs: php4 /sapi/cgi cgi_main.c
| From: | Andi Gutmans | Date: | Tue, 01 May 2001 07:10:34 +0000 |
| Subject: | Re: cvs: php4 /sapi/cgi cgi_main.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5416@lists.php.net to get a copy of this message | ||
This code originates in PHP 3. It was added in the following version:
revision 1.57
date: 1997/09/09 17:50:51; author: zeev; state: Exp; lines: +35 -7
A few more fixes to environment stuff (special variabes taken care of)
Restored phpstype*() functions to yystype*()
No comment about it though.
It sounds really weird that this has been broken for such a long time. I really hope you haven't broken anything ;)
Andi
At 03:48 AM 5/1/2001 +0000, Sterling Hughes wrote:
sterling Mon Apr 30 20:48:27 2001 EDTModified files:/php4/sapi/cgi cgi_main.cLog: 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. Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.103 php4/sapi/cgi/cgi_main.c:1.104--- php4/sapi/cgi/cgi_main.c:1.103 Mon Apr 30 15:47:51 2001 +++ php4/sapi/cgi/cgi_main.c Mon Apr 30 20:48:27 2001@@ -156,30 +156,7 @@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_REDIRECTphp_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 } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net