cvs: /php4 NEWS /php4/sapi/isapi php4isapi.c

From: Date: Sun, 13 Feb 2000 01:15:15 +0000
Subject: cvs: /php4 NEWS /php4/sapi/isapi php4isapi.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10199@lists.php.net to get a copy of this message
zeev Sat Feb 12 17:15:15 2000 EDT Modified files: /php4 NEWS /php4/sapi/isapi php4isapi.c Log: Make all of the ISAPI variables register themselves as Server variables Index: php4/NEWS diff -u php4/NEWS:1.123 php4/NEWS:1.124 --- php4/NEWS:1.123 Thu Feb 10 07:24:13 2000 +++ php4/NEWS Sat Feb 12 17:14:44 2000 @@ -6,7 +6,7 @@ - Made foreach() work on objects. (Thies, Zend library) - Added domxml extension based on libxml, still little functionality (Uwe) - Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev) -- Updated calendar dynamic library to work with PHP4. (Evan) +- Updated calendar dynamic library to work with PHP 4. (Evan) - Added strncmp() function, courtesy of Walter. (Andrei) - Made the output of var_dump() more informative. (Thies) - Fixed some OCIBindByName() problems. (Thies) @@ -209,7 +209,7 @@ - OCI8 connections are now kept open as long as they are referenced (Thies) - Cleaned up Directory-Module (Thies) - Small fix in Ora_Close (Thies) -- Ported range() and shuffle() from PHP3 to PHP4 (Andrei) +- Ported range() and shuffle() from PHP 3 to PHP 4 (Andrei) - Fixed header("HTTP/..."); behaviour (Sascha) - Improved UNIX build system. Now utilizes libtool (Sascha) - Upgrade some more internal functions to use new Zend function API. (Thies, Index: php4/sapi/isapi/php4isapi.c diff -u php4/sapi/isapi/php4isapi.c:1.21 php4/sapi/isapi/php4isapi.c:1.22 --- php4/sapi/isapi/php4isapi.c:1.21 Thu Feb 10 10:44:33 2000 +++ php4/sapi/isapi/php4isapi.c Sat Feb 12 17:14:45 2000 @@ -299,8 +299,30 @@ char *variable; char *strtok_buf = NULL; LPEXTENSION_CONTROL_BLOCK lpECB; + char **p = isapi_server_variables; lpECB = (LPEXTENSION_CONTROL_BLOCK) SG(server_context); + + /* Register the standard ISAPI variables */ + while (*p) { + variable_len = ISAPI_SERVER_VAR_BUF_SIZE; + 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); + } else if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { + variable_buf = (char *) emalloc(variable_len); + if (lpECB->GetServerVariable(lpECB->ConnID, *p, variable_buf, &variable_len) + && variable_buf[0]) { + php_register_variable(*p, variable_buf, track_vars_array ELS_CC PLS_CC); + } + efree(variable_buf); + } + p++; + } + + /* Register the internal bits of ALL_HTTP */ + + variable_len = ISAPI_SERVER_VAR_BUF_SIZE; if (lpECB->GetServerVariable(lpECB->ConnID, "ALL_HTTP", static_variable_buf, &variable_len)) { variable_buf = static_variable_buf;

« previous php.version4 (#10199) next »