diff --git a/lib/multi.c b/lib/multi.c index b63f8bf70a6c1c716df2518142e23fc52c1e9cf8..a8d3e38b59c013b2db4ddbab616775b01978176c 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -402,11 +402,6 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, /* Point to the multi's connection cache */ data->state.conn_cache = &multi->conn_cache; - 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 the pipelined requests are in order. */ diff --git a/lib/transfer.c b/lib/transfer.c index 28cc61ecc6d33a4be04be545c5d107d49e8263ef..32e8702e6869a36eab3ef2320cfb4b6cb8132a61 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);