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;
# 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
# 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
#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",
};
-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);
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;
*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;
}
}