diff options
author | Zeev Suraski <zeev@php.net> | 2000-08-09 16:45:40 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-08-09 16:45:40 +0000 |
commit | 4d692049b22a90e147e1cbe47c6de2e77b7f7e6b (patch) | |
tree | 97e49d4ffeebf7f10b09f57c53cc72a03e87103b /sapi/isapi/php4isapi.c | |
parent | 14e86fcf0aba884a8352776bfcf9a5bbec357aff (diff) | |
download | php-git-4d692049b22a90e147e1cbe47c6de2e77b7f7e6b.tar.gz |
Fix a couple of bugs in the ISAPI module:
- I think NTLM should work now
- Fix the DOCUMENT_ROOT code
Diffstat (limited to 'sapi/isapi/php4isapi.c')
-rw-r--r-- | sapi/isapi/php4isapi.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 4f39b36ca7..441b38d72a 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -380,14 +380,15 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S #ifdef PHP_WIN32 { HSE_URL_MAPEX_INFO humi; - DWORD plen = 1; + DWORD path_len = 2; + char path[] = "/"; - if (lpECB->ServerSupportFunction(lpECB->ConnID, HSE_REQ_MAP_URL_TO_PATH_EX, "/", &plen, (LPDWORD) &humi)) { - /* Remove trailing \ */ - if(humi.lpszPath[strlen(humi.lpszPath) - 1] == '\\') { - humi.lpszPath[strlen(humi.lpszPath) - 1] = '\0'; - } - php_register_variable("DOCUMENT_ROOT", humi.lpszPath, track_vars_array ELS_CC PLS_CC); + if (lpECB->ServerSupportFunction(lpECB->ConnID, HSE_REQ_MAP_URL_TO_PATH_EX, path, &path_len, (LPDWORD) &humi)) { + /* Remove trailing \ */ + if (humi.lpszPath[path_len-2] == '\\') { + humi.lpszPath[path_len-2] = 0; + } + php_register_variable("DOCUMENT_ROOT", humi.lpszPath, track_vars_array ELS_CC PLS_CC); } } #endif @@ -461,8 +462,6 @@ DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LP if (auth_password && auth_password[0]) { SG(request_info).auth_password = estrdup(auth_password); } - auth_user[0] = 0; - auth_password[0] = 0; return SF_STATUS_REQ_HANDLED_NOTIFICATION; } break; |