chunked-encoding with Content-Length: header problem

Akos Pasztory filed debian bug report #572276
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572276
mentioning a problem with a resource that returns chunked-encoded
_and_ with a Content-Length and libcurl failed to properly ignore
the latter information.
This commit is contained in:
Daniel Stenberg
2010-03-23 15:26:45 +01:00
parent 2a94293efd
commit 7fd32ce73d
3 changed files with 9 additions and 3 deletions

View File

@@ -3338,8 +3338,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
using chunked Transfer-Encoding.
*/
if(k->chunk)
k->size=-1;
k->maxdownload = k->size = -1;
}
if(-1 != k->size) {
/* We do this operation even if no_body is true, since this