Hans Leidekker : wininet: Fix calculation of content length from chunk size .
Module: wine Branch: master Commit: daa0acdbcf37d5e8ef5f200620a5eefbcbe83e0d URL: http://source.winehq.org/git/wine.git/?a=commit;h=daa0acdbcf37d5e8ef5f200620... Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 3 14:18:52 2013 +0200 wininet: Fix calculation of content length from chunk size. --- dlls/wininet/http.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 954c98b..1832b4f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2762,7 +2762,8 @@ static DWORD start_next_chunk(chunked_stream_t *stream, http_request_t *req) { TRACE( "reading %u byte chunk\n", chunk_size ); stream->chunk_size = chunk_size; - req->contentLength += chunk_size; + if (req->contentLength == ~0u) req->contentLength = chunk_size; + else req->contentLength += chunk_size; return discard_chunked_eol(stream, req); } remove_chunked_data(stream, 1);
participants (1)
-
Alexandre Julliard