winhttp: Also close the connection when there's nothing to read.
This commit is contained in:
parent
afd3685779
commit
07ed66f8ec
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue