Commit 2d1c4e69 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Correctly handle dwContentRead for gzip encoded requests.

parent b0f5b96e
......@@ -1967,6 +1967,7 @@ static DWORD read_gzip_data(http_request_t *req, BYTE *buf, int size, BOOL sync,
zstream->avail_out = size-read;
zres = inflate(zstream, Z_FULL_FLUSH);
read = size - zstream->avail_out;
req->dwContentRead += req->read_size-zstream->avail_in;
remove_data(req, req->read_size-zstream->avail_in);
if(zres == Z_STREAM_END) {
TRACE("end of data\n");
......@@ -2086,9 +2087,9 @@ static DWORD HTTPREQ_Read(http_request_t *req, void *buffer, DWORD size, DWORD *
}
finished_reading = !bytes_read && req->dwContentRead == req->dwContentLength;
req->dwContentRead += bytes_read;
}
done:
req->dwContentRead += bytes_read;
*read = bytes_read;
TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, req->dwContentRead, req->dwContentLength );
......
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