Commit 90b936f0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Try to read reamaining data in chunked_drain_content.

parent 2ecdac88
......@@ -2823,6 +2823,15 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf,
static DWORD chunked_drain_content(data_stream_t *stream, http_request_t *req)
{
chunked_stream_t *chunked_stream = (chunked_stream_t*)stream;
BYTE buf[1024];
DWORD size, res;
while(chunked_stream->state != CHUNKED_STREAM_STATE_END_OF_STREAM) {
res = chunked_read(stream, req, buf, sizeof(buf), &size, FALSE);
if(res != ERROR_SUCCESS)
return res;
}
if(chunked_stream->state != CHUNKED_STREAM_STATE_END_OF_STREAM)
return ERROR_NO_DATA;
return ERROR_SUCCESS;
......
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