Commit e27a9bc6 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Don't try to read more data than available in the current chunk in refill_buffer.

parent fa23c7fc
......@@ -2056,9 +2056,13 @@ static BOOL refill_buffer( request_t *request, BOOL notify )
{
if (!start_next_chunk( request, notify )) return FALSE;
}
len = min( len, request->read_chunked_size );
}
if (!request->read_chunked && request->content_length != ~0u)
else if (request->content_length != ~0u)
{
len = min( len, request->content_length - request->content_read );
}
if (len <= request->read_size) return TRUE;
if (!read_more_data( request, len, notify )) return FALSE;
if (!request->read_size) request->content_length = request->content_read = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment