From 07ed66f8ecb5c81c7bbc4bc0825e0d7fc728111d Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 27 Jan 2012 10:53:23 +0100 Subject: [PATCH] winhttp: Also close the connection when there's nothing to read. --- dlls/winhttp/request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index f615f41646f..516ff35874d 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1820,7 +1820,11 @@ static void drain_content( request_t *request ) DWORD bytes_read; char buffer[2048]; - if (!request->content_length) return; + if (!request->content_length) + { + finished_reading( request ); + return; + } for (;;) { if (!read_data( request, buffer, sizeof(buffer), &bytes_read, FALSE ) || !bytes_read) return; -- 2.11.4.GIT