cvs: /php4/sapi/isapi php4isapi.c
| From: | Zeev Suraski | Date: | Wed, 19 Apr 2000 15:16:03 +0000 |
| Subject: | cvs: /php4/sapi/isapi php4isapi.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13743@lists.php.net to get a copy of this message | ||
zeev Wed Apr 19 08:16:03 2000 EDT
Modified files:
/php4/sapi/isapi php4isapi.c
Log:
Improve performance of the PHP_SELF registration under ISAPI
Index: php4/sapi/isapi/php4isapi.c
diff -u php4/sapi/isapi/php4isapi.c:1.39 php4/sapi/isapi/php4isapi.c:1.40
--- php4/sapi/isapi/php4isapi.c:1.39 Sat Apr 15 12:20:43 2000
+++ php4/sapi/isapi/php4isapi.c Wed Apr 19 08:15:33 2000
@@ -322,8 +322,6 @@
if (lpECB->GetServerVariable(lpECB->ConnID, *p, static_variable_buf, &variable_len)
&& static_variable_buf[0]) {
php_register_variable(*p, static_variable_buf, track_vars_array ELS_CC PLS_CC);
- if (strcmp(*p, "SCRIPT_NAME") == 0)
- php_register_variable("PHP_SELF", static_variable_buf, track_vars_array ELS_CC
PLS_CC);
} else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
variable_buf = (char *) emalloc(variable_len);
if (lpECB->GetServerVariable(lpECB->ConnID, *p, variable_buf, &variable_len)
@@ -333,6 +331,12 @@
efree(variable_buf);
}
p++;
+ }
+
+ /* PHP_SELF support */
+ if (lpECB->GetServerVariable(lpECB->ConnID, "SCRIPT_NAME", static_variable_buf,
&variable_len)
+ && static_variable_buf[0]) {
+ php_register_variable("PHP_SELF", static_variable_buf, track_vars_array ELS_CC PLS_CC);
}
/* Register the internal bits of ALL_HTTP */