Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/winhttp/tests/winhttp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 469b882bec..1529227ed3 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -319,7 +319,7 @@ static void test_SendRequest (void) static CHAR post_data[] = "mode=Test"; static const char test_post[] = "mode => Test\0\n"; HINTERNET session, request, connection; - DWORD header_len, optional_len, total_len, bytes_rw, size, err; + DWORD header_len, optional_len, total_len, bytes_rw, size, err, disable; DWORD_PTR context; BOOL ret; CHAR buffer[256]; @@ -350,6 +350,12 @@ static void test_SendRequest (void) ret = WinHttpSetOption(request, WINHTTP_OPTION_CONTEXT_VALUE, &context, sizeof(context)); ok(ret, "WinHttpSetOption failed: %u\n", GetLastError());
+ /* writing more data than promised by the content-length header causes an error when the connection + is resued, so disable keep-alive */ + disable = WINHTTP_DISABLE_KEEP_ALIVE; + ret = WinHttpSetOption(request, WINHTTP_OPTION_DISABLE_FEATURE, &disable, sizeof(disable)); + ok(ret, "WinHttpSetOption failed: %u\n", GetLastError()); + context++; ret = WinHttpSendRequest(request, content_type, header_len, post_data, optional_len, total_len, context); err = GetLastError();