mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
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
This commit is contained in:
parent
f44b803f16
commit
903b6e0556
@ -402,11 +402,6 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
|||||||
/* Point to the multi's connection cache */
|
/* Point to the multi's connection cache */
|
||||||
data->state.conn_cache = &multi->conn_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
|
/* 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
|
list of SessionHandle structs to try and maintain a FIFO queue so
|
||||||
the pipelined requests are in order. */
|
the pipelined requests are in order. */
|
||||||
|
@ -1315,6 +1315,11 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
|
|||||||
Curl_safefree(data->info.wouldredirect);
|
Curl_safefree(data->info.wouldredirect);
|
||||||
data->info.wouldredirect = NULL;
|
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 there is a list of cookie files to read, do it now! */
|
||||||
if(data->change.cookielist)
|
if(data->change.cookielist)
|
||||||
Curl_cookie_loadfiles(data);
|
Curl_cookie_loadfiles(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user