From: Paul Gofman pgofman@codeweavers.com
Signed-off-by: Paul Gofman pgofman@codeweavers.com Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/winhttp/request.c | 6 ++++++ dlls/winhttp/tests/notification.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 39223d41bbb..279e0522166 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3909,6 +3909,12 @@ DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status return ERROR_INVALID_OPERATION; }
+ if (!socket->close_frame_received || socket->close_frame_receive_err) + { + ret = socket->close_frame_received ? socket->close_frame_receive_err : ERROR_INVALID_OPERATION; + release_object( &socket->hdr ); + return ret; + } *status = socket->status; *ret_len = socket->reason_len; if (socket->reason_len > len) ret = ERROR_INSUFFICIENT_BUFFER; diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index c57c0ef598a..cab87df339d 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -971,9 +971,9 @@ static void test_websocket(BOOL secure) close_status = 0xdead; size = sizeof(buffer) + 1; err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size ); - todo_wine ok( err == ERROR_INVALID_OPERATION, "got %u\n", err ); - todo_wine ok( close_status == 0xdead, "got %u\n", close_status ); - todo_wine ok( size == sizeof(buffer) + 1, "got %u\n", size ); + ok( err == ERROR_INVALID_OPERATION, "got %u\n", err ); + ok( close_status == 0xdead, "got %u\n", close_status ); + ok( size == sizeof(buffer) + 1, "got %u\n", size );
WaitForSingleObject( info.wait, INFINITE );
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=106084
Your paranoid android.
=== w8adm (32 bit report) ===
winhttp: notification.c:256: Test failed: failed to send request 12007 notification.c:258: Test failed: unexpected function 3, expected 4. probably some notifications were missing notification.c:260: Test failed: failed to receive response 12019 notification.c:264: Test failed: failed unexpectedly 12019 notification.c:265: Test failed: request failed unexpectedly 0 notification.c:268: Test failed: unexpected function 3, expected 13. probably some notifications were missing notification.c:116: Test failed: 268: expected status 0x00000002 got 0x00000800 notification.c:117: Test failed: 268: expected function 3 got 13 notification: Timeout