aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-07 23:52:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-06-14 23:31:01 +0200
commitff7097f72c26a9d389f135f76cb28e10ca30f4c1 (patch)
tree25d9e6ec57b9ee38c7a31120430f7c8d7034ce28 /lib/multi.c
parent55fc47a40130fd6ec78fcb83da3ecedb702fa0f7 (diff)
urldata: store POST size in state.infilesize too
... to simplify checking when PUT _or_ POST have completed. Reported-by: Frank Meier Bug: http://curl.haxx.se/mail/lib-2015-06/0019.html
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 2956022e4..b63f8bf70 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -402,7 +402,10 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
/* Point to the multi's connection cache */
data->state.conn_cache = &multi->conn_cache;
- data->state.infilesize = data->set.filesize;
+ if(data->set.httpreq == HTTPREQ_PUT)
+ data->state.infilesize = data->set.filesize;
+ else
+ data->state.infilesize = data->set.postfieldsize;
/* This adds the new entry at the 'end' of the doubly-linked circular
list of SessionHandle structs to try and maintain a FIFO queue so