summaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-23 17:48:37 -0700
committerDaniel Stenberg <daniel@haxx.se>2015-06-23 17:48:37 -0700
commit903b6e05565bf826b4194447864288642214b094 (patch)
tree4ecd4e3e052c83f66565750e8e8d2ad08d36ccd0 /lib/transfer.c
parentf44b803f1605edcfc4058b1a818c44552f0affec (diff)
downloadcurl-903b6e05565bf826b4194447864288642214b094.tar.gz
pretransfer: init state.infilesize here, not in add_handle
... to properly support that options are set to the handle after it is added to the multi handle. Bug: http://curl.haxx.se/mail/lib-2015-06/0122.html Reported-by: Stefan Bühler
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 28cc61ecc..32e8702e6 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1315,6 +1315,11 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
Curl_safefree(data->info.wouldredirect);
data->info.wouldredirect = NULL;
+ if(data->set.httpreq == HTTPREQ_PUT)
+ data->state.infilesize = data->set.filesize;
+ else
+ data->state.infilesize = data->set.postfieldsize;
+
/* If there is a list of cookie files to read, do it now! */
if(data->change.cookielist)
Curl_cookie_loadfiles(data);