diff options
-rw-r--r-- | main/SAPI.c | 1 | ||||
-rw-r--r-- | main/main.c | 1 | ||||
-rw-r--r-- | php4.dsp | 4 | ||||
-rw-r--r-- | php4dll.dsp | 20 | ||||
-rw-r--r-- | sapi/isapi/php4isapi.c | 27 |
5 files changed, 27 insertions, 26 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 412f4f3aba..f1eec0aa49 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -178,7 +178,6 @@ SAPI_API void sapi_activate(SLS_D) SG(request_info).post_data = NULL; SG(request_info).current_user = NULL; SG(request_info).current_user_length = 0; - SG(request_info).auth_user = SG(request_info).auth_password = NULL; if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "HEAD")) { SG(request_info).headers_only = 1; diff --git a/main/main.c b/main/main.c index ee5e4bd05f..1478ee7c0e 100644 --- a/main/main.c +++ b/main/main.c @@ -795,6 +795,7 @@ int php_module_startup(sapi_module_struct *sf) global_lock_init(); SG(server_context) = NULL; SG(request_info).request_method = NULL; + SG(request_info).auth_user = SG(request_info).auth_password = NULL; sapi_activate(SLS_C); if (module_initialized) { @@ -121,6 +121,10 @@ LINK32=link.exe SOURCE=.\sapi\cgi\cgi_main.c # End Source File +# Begin Source File + +SOURCE=.\sapi\cgi\getopt.c +# End Source File # End Group # Begin Group "Header Files" diff --git a/php4dll.dsp b/php4dll.dsp index af72091aad..ea9ca399de 100644 --- a/php4dll.dsp +++ b/php4dll.dsp @@ -140,10 +140,6 @@ SOURCE=".\fopen-wrappers.c" # End Source File
# Begin Source File
-SOURCE=.\getopt.c
-# End Source File
-# Begin Source File
-
SOURCE=.\internal_functions_win32.c
!IF "$(CFG)" == "php4dll - Win32 Debug"
@@ -760,19 +756,29 @@ SOURCE=.\ext\pcre\pcrelib\pcre.h # PROP Default_Filter ".c"
# Begin Source File
+SOURCE=.\dlist.c
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"
+# End Source File
+# Begin Source File
+
+SOURCE=.\ext\wddx\wddx.c
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"
+# End Source File
+# Begin Source File
+
SOURCE=.\ext\xml\xml.c
!IF "$(CFG)" == "php4dll - Win32 Debug"
-# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"
+# ADD CPP /I "ext\xml\expat\xmlparse" /I "ext\xml\expat\xmltok"
!ELSEIF "$(CFG)" == "php4dll - Win32 Release"
-# ADD CPP /I "ext\xml\expat\xmltok"
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"
!ELSEIF "$(CFG)" == "php4dll - Win32 Release_inline"
-# ADD CPP /I "ext\xml\expat\xmltok"
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"
!ENDIF
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 72a7bec1c0..8e6999a745 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -38,7 +38,7 @@ #define ISAPI_SERVER_VAR_BUF_SIZE 1024 #define ISAPI_POST_DATA_BUF 1024 -static int isapi_globals_id=-1; +static zend_bool bFilterLoaded=0; static char *isapi_server_variables[] = { "ALL_HTTP", @@ -395,15 +395,9 @@ static sapi_module_struct sapi_module = { }; -typedef struct _php_isapi_globals { - char *auth_user; - char *auth_password; -} php_isapi_globals; - - BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pFilterVersion) { - isapi_globals_id = ts_allocate_id(sizeof(php_isapi_globals), NULL, NULL); + bFilterLoaded = 1; pFilterVersion->dwFilterVersion = HTTP_FILTER_REVISION; strcpy(pFilterVersion->lpszFilterDesc, sapi_module.name); pFilterVersion->dwFlags= (SF_NOTIFY_AUTHENTICATION | SF_NOTIFY_PREPROC_HEADERS); @@ -413,22 +407,22 @@ BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pFilterVersion) DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification) { - php_isapi_globals *isapi_globals = ts_resource(isapi_globals_id); + SLS_FETCH(); switch (notificationType) { case SF_NOTIFY_PREPROC_HEADERS: - isapi_globals->auth_user = NULL; - isapi_globals->auth_password = NULL; + SG(request_info).auth_user = NULL; + SG(request_info).auth_password = NULL; break; case SF_NOTIFY_AUTHENTICATION: { char *auth_user = ((HTTP_FILTER_AUTHENT *) pvNotification)->pszUser; char *auth_password = ((HTTP_FILTER_AUTHENT *) pvNotification)->pszPassword; if (auth_user && auth_user[0]) { - isapi_globals->auth_user = estrdup(auth_user); + SG(request_info).auth_user = estrdup(auth_user); } if (auth_password && auth_password[0]) { - isapi_globals->auth_password = estrdup(auth_password); + SG(request_info).auth_password = estrdup(auth_password); } auth_user[0] = 0; auth_password[0] = 0; @@ -457,11 +451,8 @@ static void init_request_info(sapi_globals_struct *sapi_globals, LPEXTENSION_CON *path_end = '\\'; } } - if (isapi_globals_id!=-1) { /* we have valid ISAPI Filter information */ - php_isapi_globals *isapi_globals = ts_resource(isapi_globals_id); - - SG(request_info).auth_user = isapi_globals->auth_user; - SG(request_info).auth_password = isapi_globals->auth_password; + if (!bFilterLoaded) { /* we don't have valid ISAPI Filter information */ + SG(request_info).auth_user = SG(request_info).auth_password = NULL; } } |