Allen Pulsifer provided a patch that makes libcurl set the expected download
size earlier when doing HTTP downloads, so that applications and the progress meter etc know get the info earlier in the flow than before.
This commit is contained in:
@@ -869,6 +869,10 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
if(contentlength >= 0) {
|
||||
k->size = contentlength;
|
||||
k->maxdownload = k->size;
|
||||
/* we set the progress download size already at this point
|
||||
just to make it easier for apps/callbacks to extract this
|
||||
info as soon as possible */
|
||||
Curl_pgrsSetDownloadSize(data, k->size);
|
||||
}
|
||||
else {
|
||||
/* Negative Content-Length is really odd, and we know it
|
||||
|
||||
Reference in New Issue
Block a user