wininet: Don't report error in read_gzip_data when to much data was cached.

This commit is contained in:
Piotr Caban 2010-07-20 00:32:59 +02:00 committed by Alexandre Julliard
parent c6d34d7b05
commit 0736ca71e7
1 changed files with 3 additions and 0 deletions

View File

@ -2083,6 +2083,9 @@ static DWORD read_gzip_data(http_request_t *req, BYTE *buf, int size, BOOL sync,
break; break;
} }
if(req->dwContentRead == req->dwContentLength)
break;
buf_avail = req->dwContentLength == ~0 ? req->read_size : min(req->read_size, req->dwContentLength-req->dwContentRead); buf_avail = req->dwContentLength == ~0 ? req->read_size : min(req->read_size, req->dwContentLength-req->dwContentRead);
zstream->next_in = req->read_buf+req->read_pos; zstream->next_in = req->read_buf+req->read_pos;