winhttp: Also close the connection when there's nothing to read.

This commit is contained in:
Hans Leidekker 2012-01-27 10:53:23 +01:00 committed by Alexandre Julliard
parent afd3685779
commit 07ed66f8ec
1 changed files with 5 additions and 1 deletions

View File

@ -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;