diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index d6b464940b1..1dbfe08ba88 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -970,8 +970,9 @@ static void CALLBACK cert_error(HINTERNET handle, DWORD_PTR ctx, DWORD status, L static void test_secure_connection(void) { + static const char data_start[] = " 2014, "available_size = %u\n", available_size); + status = 0xdeadbeef; size = sizeof(status); ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, NULL, &status, &size, NULL); @@ -1068,8 +1074,11 @@ static void test_secure_connection(void) ok(ret == TRUE, "WinHttpReadData failed: %u.\n", GetLastError()); if (!size) break; read_size += size; + + if (read_size <= 32) + ok(!memcmp(buffer, data_start, sizeof(data_start)-1), "not expected: %.32s\n", buffer); } - ok(read_size > 2014, "read_size = %u\n", read_size); + ok(read_size >= available_size, "read_size = %u, available_size = %u\n", read_size, available_size); cleanup: WinHttpCloseHandle(req);