aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-11 21:05:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-11 21:05:13 +0000
commit6d3701318d99f324b4f79246636f1a78cef58286 (patch)
treea9c3f32ac6ee8a5345ca0db13379ccaebc986285 /lib
parentd0edb478964cb5bf7446c34d5ac1e9d34dc5ca63 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index f276dc0f8..de1e18640 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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