]> granicus.if.org Git - php/commitdiff
- Update .dsp's
authorZeev Suraski <zeev@php.net>
Wed, 16 Feb 2000 16:46:01 +0000 (16:46 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 16 Feb 2000 16:46:01 +0000 (16:46 +0000)
- Fix auth_user issue

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

index 412f4f3abad8e1907ef6934bbb59d6901f6aa21d..f1eec0aa494d1295446cf1d2ee9e1c7d3f8505a0 100644 (file)
@@ -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;
index ee5e4bd05f2dd48f034b4059d4416a4c9b7a9f4e..1478ee7c0eb5005d9d731b3fb380253907455328 100644 (file)
@@ -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) {
index dea1919f3366d1be454c382b367a6395cabcd052..e341ab1fe65eed3c80ce867b2576aaeaf41b962d 100644 (file)
--- a/php4.dsp
+++ b/php4.dsp
@@ -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"
 
index af72091aade541abdcde8cf13781dc20a479215e..ea9ca399de9912f85f19c12e79096c5138d616c6 100644 (file)
@@ -140,10 +140,6 @@ SOURCE=".\fopen-wrappers.c"
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=.\getopt.c\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=.\internal_functions_win32.c\r
 \r
 !IF  "$(CFG)" == "php4dll - Win32 Debug"\r
@@ -760,19 +756,29 @@ SOURCE=.\ext\pcre\pcrelib\pcre.h
 # PROP Default_Filter ".c"\r
 # Begin Source File\r
 \r
+SOURCE=.\dlist.c\r
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\ext\wddx\wddx.c\r
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\ext\xml\xml.c\r
 \r
 !IF  "$(CFG)" == "php4dll - Win32 Debug"\r
 \r
-# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"\r
+# ADD CPP /I "ext\xml\expat\xmlparse" /I "ext\xml\expat\xmltok"\r
 \r
 !ELSEIF  "$(CFG)" == "php4dll - Win32 Release"\r
 \r
-# ADD CPP /I "ext\xml\expat\xmltok"\r
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"\r
 \r
 !ELSEIF  "$(CFG)" == "php4dll - Win32 Release_inline"\r
 \r
-# ADD CPP /I "ext\xml\expat\xmltok"\r
+# ADD CPP /I "ext\xml\expat\xmltok" /I "ext\xml\expat\xmlparse"\r
 \r
 !ENDIF \r
 \r
index 72a7bec1c0f4c5a4106326749af32072b959a83c..8e6999a74590b0626e37d771609655f8ea17a60e 100644 (file)
@@ -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;
        }
 }