aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-05 13:40:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-05 13:40:31 +0000
commit07ce7539a8e1851fcda2f1d8c32ca05a754461cc (patch)
treed654ffea87ba3417e75eecd9bda3853f236a74d0 /lib
parentc21f848c1c54b10e6d0f99baf520789803437a4e (diff)
set download size properly for HTTP downloads
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 5916ea916..bf67788c2 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -365,8 +365,10 @@ _Transfer(struct connectdata *c_conn)
}
/* check for Content-Length: header lines to get size */
if (strnequal("Content-Length", p, 14) &&
- sscanf (p+14, ": %ld", &contentlength))
+ sscanf (p+14, ": %ld", &contentlength)) {
conn->size = contentlength;
+ Curl_pgrsSetDownloadSize(data, contentlength);
+ }
else if (strnequal("Connection: close", p,
strlen("Connection: close"))) {
/*
@@ -625,8 +627,6 @@ _Transfer(struct connectdata *c_conn)
return CURLE_OK;
}
-typedef int (*func_T)(void);
-
CURLcode curl_transfer(CURL *curl)
{
CURLcode res;