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

This commit is contained in:
Hans Leidekker 2015-03-16 10:57:07 +01:00 committed by Alexandre Julliard
parent fa23c7fcb3
commit e27a9bc6bc
1 changed files with 5 additions and 1 deletions

View File

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