HTTP: reset expected DL/UL sizes on redirects
With FOLLOWLOCATION enabled. When a 3xx page is downloaded and the download size was known (like with a Content-Length header), but the subsequent URL (transfered after the 3xx page) was chunked encoded, then the previous "known download size" would linger and cause the progress meter to get incorrect information, ie the former value would remain being sent in. This could easily result in downloads that were WAY larger than "expected" and would cause >100% outputs with the curl command line tool. Test case 599 was created and it was used to repeat the bug and then verify the fix. Bug: http://curl.haxx.se/bug/view.cgi?id=3510057 Reported by: Michael Wallner
This commit is contained in:
@@ -1924,7 +1924,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
|
||||
break;
|
||||
}
|
||||
Curl_pgrsTime(data, TIMER_REDIRECT);
|
||||
Curl_pgrsResetTimes(data);
|
||||
Curl_pgrsResetTimesSizes(data);
|
||||
|
||||
return CURLE_OK;
|
||||
#endif /* CURL_DISABLE_HTTP */
|
||||
|
Reference in New Issue
Block a user