winhttp: Disable automatic authentication.

Hans Leidekker hans at codeweavers.com
Thu Jul 28 02:08:26 CDT 2011


Fixes http://bugs.winehq.org/show_bug.cgi?id=27898
---
 dlls/winhttp/request.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index ef5c2cb..01fdc20 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2440,7 +2440,7 @@ static HRESULT WINAPI winhttp_request_Open(
     HINTERNET hsession = NULL, hconnect = NULL, hrequest;
     URL_COMPONENTS uc;
     WCHAR *hostname, *path;
-    DWORD err, len, flags = 0, request_flags = 0;
+    DWORD err, len, flags = 0, request_flags = 0, disable_flags;
 
     TRACE("%p, %s, %s, %s\n", request, debugstr_w(method), debugstr_w(url),
           debugstr_variant(&async));
@@ -2488,6 +2488,12 @@ static HRESULT WINAPI winhttp_request_Open(
         err = get_last_error();
         goto error;
     }
+    disable_flags = WINHTTP_DISABLE_AUTHENTICATION;
+    if (!WinHttpSetOption( hrequest, WINHTTP_OPTION_DISABLE_FEATURE, &disable_flags, sizeof(disable_flags) ))
+    {
+        err = get_last_error();
+        goto error;
+    }
     if (flags & WINHTTP_FLAG_ASYNC)
     {
         request->wait   = CreateEventW( NULL, FALSE, FALSE, NULL );
-- 
1.7.4.1






More information about the wine-patches mailing list