Redirect overwrites `CURLOPT_URL` option value when `CURLOPT_FOLLOWLOCATION` used. #1631
Libcurl is used by the following scheme:
The code uses
After some request was finished by redirect, subsequent requests are done to new location, not to location set by
That is unexpected and undocumented behaviour.
It is expected that subsequent calls to
IMHO, something required to be changed - code or documentation.
What do you think?
7.38.0 (yes, it is quite old, but I found no issue-related changes in current 7.54.1 version too)
Related Collectd issue: collectd/collectd#2328
At the https://curl.haxx.se/libcurl/c/curl_easy_perform.html page there is the following note:
But it is unclear if it is general requirement or only related to 'more than one file transfer', which requires to change file URL.