mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:23:31 +03:00
multi: init_do(): check result
Calls to `Curl_init_do()` did not check on result and missed failures to properly and completely initialize a transfer request. The main cause of such an init failure is the need to rewind the READFUNCTION without a SEEKFUNCTION registered. Check the failure to "rewind" the upload data immediately make test cases 1576 and friends fail. Reported-by: Travis Lane Fixes #17139 Closes #17150
This commit is contained in:
parent
39f5e7cb69
commit
5e95556fc2
4 changed files with 33 additions and 17 deletions
|
|
@ -1560,10 +1560,15 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi,
|
|||
rc = curl_multi_add_handle(multi, data);
|
||||
if(!rc) {
|
||||
struct SingleRequest *k = &data->req;
|
||||
CURLcode result;
|
||||
|
||||
/* pass in NULL for 'conn' here since we do not want to init the
|
||||
connection, only this transfer */
|
||||
Curl_init_do(data, NULL);
|
||||
result = Curl_init_do(data, NULL);
|
||||
if(result) {
|
||||
curl_multi_remove_handle(multi, data);
|
||||
return CURLM_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
/* take this handle to the perform state right away */
|
||||
multistate(data, MSTATE_PERFORMING);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue