Jacek Caban : wininet: Get rid of no longer needed hack in gzip_read that prevents consuming the whole input buffer until we 're at the end of stream.
Alexandre Julliard
julliard at winehq.org
Wed Mar 5 14:12:32 CST 2014
Module: wine
Branch: master
Commit: 2667a5376c1d9ff6de483940cd1fe8aa391af13a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2667a5376c1d9ff6de483940cd1fe8aa391af13a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Mar 5 18:28:24 2014 +0100
wininet: Get rid of no longer needed hack in gzip_read that prevents consuming the whole input buffer until we're at the end of stream.
---
dlls/wininet/http.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 9a82368..ad5d956 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -440,14 +440,11 @@ static DWORD gzip_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DW
gzip_stream_t *gzip_stream = (gzip_stream_t*)stream;
z_stream *zstream = &gzip_stream->zstream;
DWORD current_read, ret_read = 0;
- BOOL end;
int zres;
DWORD res = ERROR_SUCCESS;
while(size && !gzip_stream->end_of_data) {
- end = gzip_stream->parent_stream->vtbl->end_of_data(gzip_stream->parent_stream, req);
-
- if(gzip_stream->buf_size <= 64 && !end) {
+ if(!gzip_stream->buf_size) {
if(gzip_stream->buf_pos) {
if(gzip_stream->buf_size)
memmove(gzip_stream->buf, gzip_stream->buf+gzip_stream->buf_pos, gzip_stream->buf_size);
@@ -458,20 +455,18 @@ static DWORD gzip_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DW
gzip_stream->buf_size += current_read;
if(res != ERROR_SUCCESS)
break;
- end = gzip_stream->parent_stream->vtbl->end_of_data(gzip_stream->parent_stream, req);
- if(!current_read && !end) {
+
+ if(!current_read) {
if(blocking_mode != BLOCKING_DISALLOW) {
WARN("unexpected end of data\n");
gzip_stream->end_of_data = TRUE;
}
break;
}
- if(gzip_stream->buf_size <= 64 && !end)
- continue;
}
zstream->next_in = gzip_stream->buf+gzip_stream->buf_pos;
- zstream->avail_in = gzip_stream->buf_size-(end ? 0 : 64);
+ zstream->avail_in = gzip_stream->buf_size;
zstream->next_out = buf+ret_read;
zstream->avail_out = size;
zres = inflate(&gzip_stream->zstream, 0);
More information about the wine-cvs
mailing list