mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wininet: Correctly handle dwContentRead for gzip encoded requests.
This commit is contained in:
parent
b0f5b96efe
commit
2d1c4e6928
1 changed files with 2 additions and 1 deletions
|
@ -1967,6 +1967,7 @@ static DWORD read_gzip_data(http_request_t *req, BYTE *buf, int size, BOOL sync,
|
||||||
zstream->avail_out = size-read;
|
zstream->avail_out = size-read;
|
||||||
zres = inflate(zstream, Z_FULL_FLUSH);
|
zres = inflate(zstream, Z_FULL_FLUSH);
|
||||||
read = size - zstream->avail_out;
|
read = size - zstream->avail_out;
|
||||||
|
req->dwContentRead += req->read_size-zstream->avail_in;
|
||||||
remove_data(req, req->read_size-zstream->avail_in);
|
remove_data(req, req->read_size-zstream->avail_in);
|
||||||
if(zres == Z_STREAM_END) {
|
if(zres == Z_STREAM_END) {
|
||||||
TRACE("end of data\n");
|
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;
|
finished_reading = !bytes_read && req->dwContentRead == req->dwContentLength;
|
||||||
|
req->dwContentRead += bytes_read;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
req->dwContentRead += bytes_read;
|
|
||||||
*read = bytes_read;
|
*read = bytes_read;
|
||||||
|
|
||||||
TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, req->dwContentRead, req->dwContentLength );
|
TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, req->dwContentRead, req->dwContentLength );
|
||||||
|
|
Loading…
Reference in a new issue