summaryrefslogtreecommitdiff
path: root/sapi/isapi/php4isapi.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-04-19 15:15:33 +0000
committerZeev Suraski <zeev@php.net>2000-04-19 15:15:33 +0000
commit708811184d2c7534495f293b4c21203c717ea8aa (patch)
tree73d1a8eebb284a807d91d784762b1e3976d17fb3 /sapi/isapi/php4isapi.c
parent9cbcade6c90d1635368dbb2ee2234c77714785bb (diff)
downloadphp-git-708811184d2c7534495f293b4c21203c717ea8aa.tar.gz
Improve performance of the PHP_SELF registration under ISAPI
Diffstat (limited to 'sapi/isapi/php4isapi.c')
-rw-r--r--sapi/isapi/php4isapi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c
index 378d142200..0b79271bf6 100644
--- a/sapi/isapi/php4isapi.c
+++ b/sapi/isapi/php4isapi.c
@@ -322,8 +322,6 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S
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)
@@ -335,6 +333,12 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S
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 */
variable_len = ISAPI_SERVER_VAR_BUF_SIZE;