From 7939090fde5a51b7db63bdcdd683c98eb672b16b Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 28 Jul 2011 09:08:26 +0200 Subject: [PATCH] winhttp: Disable automatic authentication. --- dlls/winhttp/request.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index ef5c2cb0824..01fdc206522 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 );