[2/3] winhttp: Also close the connection when there's nothing to read.

Hans Leidekker hans at codeweavers.com
Fri Jan 27 03:53:23 CST 2012


Fix for http://bugs.winehq.org/show_bug.cgi?id=29715
---
 dlls/winhttp/request.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index f615f41..516ff35 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;
-- 
1.7.8.3







More information about the wine-patches mailing list