Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/wininet/http.c | 4 ++-- dlls/wininet/tests/http.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index cbc95fb8ae..c90213bf46 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3911,8 +3911,8 @@ lend: WININET_Release( &request->hdr );
TRACE("%u <--\n", res); - if(res != ERROR_SUCCESS) - SetLastError(res); + + SetLastError(res); return res == ERROR_SUCCESS; }
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 5a0cc11754..d5e0a432db 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -722,8 +722,11 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
length = sizeof(buffer)-2; memset(buffer, 0x77, sizeof(buffer)); + SetLastError(0xdeadbeef); res = HttpQueryInfoA(hor,HTTP_QUERY_RAW_HEADERS,buffer,&length,0x0); ok(res, "HttpQueryInfoA(HTTP_QUERY_RAW_HEADERS) failed with error %d\n", GetLastError()); + /* Windows 7 and above Reset LastError */ + ok(GetLastError() == 0 || broken(GetLastError() == 0xdeadbeef), "Last Error not reset 0x%x\n", GetLastError()); /* show that the function writes data past the length returned */ ok(buffer[length-2], "Expected any header character, got 0x00\n"); ok(!buffer[length-1], "Expected 0x00, got %02X\n", buffer[length-1]);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53979
Your paranoid android.
=== debian9 (32 bit French report) ===
wininet: http.c:4580: Test failed: expected 1 pending read, got 2