wininet: Always set last error in HttpQueryInfoW.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
223c3b4538
commit
3522b127a3
|
@ -3920,8 +3920,8 @@ lend:
|
||||||
WININET_Release( &request->hdr );
|
WININET_Release( &request->hdr );
|
||||||
|
|
||||||
TRACE("%u <--\n", res);
|
TRACE("%u <--\n", res);
|
||||||
if(res != ERROR_SUCCESS)
|
|
||||||
SetLastError(res);
|
SetLastError(res);
|
||||||
return res == ERROR_SUCCESS;
|
return res == ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -722,8 +722,11 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
|
||||||
|
|
||||||
length = sizeof(buffer)-2;
|
length = sizeof(buffer)-2;
|
||||||
memset(buffer, 0x77, sizeof(buffer));
|
memset(buffer, 0x77, sizeof(buffer));
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
res = HttpQueryInfoA(hor,HTTP_QUERY_RAW_HEADERS,buffer,&length,0x0);
|
res = HttpQueryInfoA(hor,HTTP_QUERY_RAW_HEADERS,buffer,&length,0x0);
|
||||||
ok(res, "HttpQueryInfoA(HTTP_QUERY_RAW_HEADERS) failed with error %d\n", GetLastError());
|
ok(res, "HttpQueryInfoA(HTTP_QUERY_RAW_HEADERS) failed with error %d\n", GetLastError());
|
||||||
|
ok(GetLastError() == 0 ||
|
||||||
|
broken(GetLastError() == 0xdeadbeef /* XP/W2K3 */), "Last Error not reset %u\n", GetLastError());
|
||||||
/* show that the function writes data past the length returned */
|
/* show that the function writes data past the length returned */
|
||||||
ok(buffer[length-2], "Expected any header character, got 0x00\n");
|
ok(buffer[length-2], "Expected any header character, got 0x00\n");
|
||||||
ok(!buffer[length-1], "Expected 0x00, got %02X\n", buffer[length-1]);
|
ok(!buffer[length-1], "Expected 0x00, got %02X\n", buffer[length-1]);
|
||||||
|
|
Loading…
Reference in New Issue