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
This commit is contained in:
Daniel Stenberg
2015-06-07 23:52:34 +02:00
parent 55fc47a401
commit ff7097f72c
3 changed files with 11 additions and 8 deletions

View File

@@ -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