mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
winhttp: Don't drain content until authorization is handled successfully.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e10c48143a
commit
d3f7519035
2 changed files with 2 additions and 5 deletions
|
@ -2421,8 +2421,8 @@ static BOOL receive_response( request_t *request, BOOL async )
|
||||||
{
|
{
|
||||||
if (request->hdr.disable_flags & WINHTTP_DISABLE_AUTHENTICATION) break;
|
if (request->hdr.disable_flags & WINHTTP_DISABLE_AUTHENTICATION) break;
|
||||||
|
|
||||||
drain_content( request );
|
|
||||||
if (!handle_authorization( request, status )) break;
|
if (!handle_authorization( request, status )) break;
|
||||||
|
drain_content( request );
|
||||||
|
|
||||||
/* recurse synchronously */
|
/* recurse synchronously */
|
||||||
if ((ret = send_request( request, NULL, 0, request->optional, request->optional_len, 0, 0, FALSE ))) continue;
|
if ((ret = send_request( request, NULL, 0, request->optional, request->optional_len, 0, 0, FALSE ))) continue;
|
||||||
|
@ -3062,7 +3062,7 @@ static HRESULT WINAPI winhttp_request_SetCredentials(
|
||||||
DWORD target, scheme = WINHTTP_AUTH_SCHEME_BASIC; /* FIXME: query supported schemes */
|
DWORD target, scheme = WINHTTP_AUTH_SCHEME_BASIC; /* FIXME: query supported schemes */
|
||||||
DWORD err = ERROR_SUCCESS;
|
DWORD err = ERROR_SUCCESS;
|
||||||
|
|
||||||
TRACE("%p, %s, %p\n", request, debugstr_w(username), password);
|
TRACE("%p, %s, %p, 0x%08x\n", request, debugstr_w(username), password, flags);
|
||||||
|
|
||||||
EnterCriticalSection( &request->cs );
|
EnterCriticalSection( &request->cs );
|
||||||
if (request->state < REQUEST_STATE_OPEN)
|
if (request->state < REQUEST_STATE_OPEN)
|
||||||
|
|
|
@ -2317,9 +2317,7 @@ static void test_basic_authentication(int port)
|
||||||
ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError());
|
ok(ret || broken(error == ERROR_WINHTTP_SHUTDOWN || error == ERROR_WINHTTP_TIMEOUT) /* XP */, "failed to read data %u\n", GetLastError());
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
todo_wine
|
|
||||||
ok(size == 12, "expected 12, got %u\n", size);
|
ok(size == 12, "expected 12, got %u\n", size);
|
||||||
todo_wine
|
|
||||||
ok(!memcmp(buffer, unauthorized, 12), "got %s\n", buffer);
|
ok(!memcmp(buffer, unauthorized, 12), "got %s\n", buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3651,7 +3649,6 @@ static void test_IWinHttpRequest(int port)
|
||||||
|
|
||||||
hr = IWinHttpRequest_get_ResponseText( req, &response );
|
hr = IWinHttpRequest_get_ResponseText( req, &response );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
todo_wine
|
|
||||||
ok( !memcmp( response, unauthW, sizeof(unauthW) ), "got %s\n", wine_dbgstr_w(response) );
|
ok( !memcmp( response, unauthW, sizeof(unauthW) ), "got %s\n", wine_dbgstr_w(response) );
|
||||||
SysFreeString( response );
|
SysFreeString( response );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue