cvs: /php4 SAPI.c main.c php4.dsp php4dll.dsp /php4/sapi/isapi php4isapi.c

From: Date: Wed, 16 Feb 2000 16:46:32 +0000
Subject: cvs: /php4 SAPI.c main.c php4.dsp php4dll.dsp /php4/sapi/isapi php4isapi.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10363@lists.php.net to get a copy of this message
zeev Wed Feb 16 08:46:32 2000 EDT Modified files: /php4 SAPI.c main.c php4.dsp php4dll.dsp /php4/sapi/isapi php4isapi.c Log: - Update .dsp's - Fix auth_user issue Index: php4/SAPI.c diff -u php4/SAPI.c:1.53 php4/SAPI.c:1.54 --- php4/SAPI.c:1.53 Tue Feb 15 15:31:08 2000 +++ php4/SAPI.c Wed Feb 16 08:46:01 2000 @@ -178,7 +178,6 @@ 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; Index: php4/main.c diff -u php4/main.c:1.207 php4/main.c:1.208 --- php4/main.c:1.207 Mon Feb 14 07:36:45 2000 +++ php4/main.c Wed Feb 16 08:46:01 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.207 2000/02/14 15:36:45 ssb Exp $ */ +/* $Id: main.c,v 1.208 2000/02/16 16:46:01 zeev Exp $ */ #include <stdio.h> @@ -795,6 +795,7 @@ 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) { Index: php4/php4.dsp diff -u php4/php4.dsp:1.21 php4/php4.dsp:1.22 --- php4/php4.dsp:1.21 Fri Feb 11 08:28:49 2000 +++ php4/php4.dsp Wed Feb 16 08:46:01 2000 @@ -121,6 +121,10 @@ 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" Index: php4/php4dll.dsp diff -u php4/php4dll.dsp:1.33 php4/php4dll.dsp:1.34 --- php4/php4dll.dsp:1.33 Fri Feb 11 08:28:49 2000 +++ php4/php4dll.dsp Wed Feb 16 08:46:01 2000 @@ -140,10 +140,6 @@ # 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 @@ # 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 Index: php4/sapi/isapi/php4isapi.c diff -u php4/sapi/isapi/php4isapi.c:1.26 php4/sapi/isapi/php4isapi.c:1.27 --- php4/sapi/isapi/php4isapi.c:1.26 Wed Feb 16 05:34:07 2000 +++ php4/sapi/isapi/php4isapi.c Wed Feb 16 08:46:01 2000 @@ -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 @@ }; -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 @@ 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 @@ *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; } }

« previous php.version4 (#10363) next »