winhttp: Disable automatic authentication.

This commit is contained in:
Hans Leidekker 2011-07-28 09:08:26 +02:00 committed by Alexandre Julliard
parent 20bdf059ab
commit 7939090fde
1 changed files with 7 additions and 1 deletions

View File

@ -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 );