mirror of
https://github.com/curl/curl.git
synced 2026-07-24 11:37:21 +03:00
url: make the original string get used on subsequent transfers
... since CURLOPT_URL should follow the same rules as other options: they remain set until changed or cleared. Added test 1551 to verify. Fixes #1631 Closes #1632 Reported-by: Pavel Rochnyak
This commit is contained in:
parent
c0cdc68c7e
commit
b3786f61dc
5 changed files with 129 additions and 2 deletions
|
|
@ -1288,6 +1288,13 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
|
|||
failf(data, "No URL set!");
|
||||
return CURLE_URL_MALFORMAT;
|
||||
}
|
||||
/* since the URL may have been redirected in a previous use of this handle */
|
||||
if(data->change.url_alloc) {
|
||||
/* the already set URL is allocated, free it first! */
|
||||
Curl_safefree(data->change.url);
|
||||
data->change.url_alloc = FALSE;
|
||||
}
|
||||
data->change.url = data->set.str[STRING_SET_URL];
|
||||
|
||||
/* Init the SSL session ID cache here. We do it here since we want to do it
|
||||
after the *_setopt() calls (that could specify the size of the cache) but
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue