From 6d3701318d99f324b4f79246636f1a78cef58286 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 11 Aug 2007 21:05:13 +0000 Subject: 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. --- lib/transfer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3