From ff7097f72c26a9d389f135f76cb28e10ca30f4c1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 7 Jun 2015 23:52:34 +0200 Subject: 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 --- lib/multi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/multi.c') 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 -- cgit v1.2.3