-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
Hi.
In Collectd project (http://collectd.org, https://github.com/collectd/collectd/) there are several plugins which uses libcurl.
Libcurl is used by the following scheme:
- Libcurl object initialized and configured once, by calling
curl_easy_init()andcurl_easy_setopt(). - Requests will be done later by calling
curl_easy_perform()on the same libcurl object many times.
The code uses CURLOPT_FOLLOWLOCATION option set to 1 at initialization.
The CURLOPT_URL option set at the same time (at initialization).
After some request was finished by redirect, subsequent requests are done to new location, not to location set by CURLOPT_URL.
That is unexpected and undocumented behaviour.
It is expected that subsequent calls to curl_easy_perform() will be done with same options set, and to the location, set by CURLOPT_URL.
IMHO, something required to be changed - code or documentation.
What do you think?
curl/libcurl version
7.38.0 (yes, it is quite old, but I found no issue-related changes in current 7.54.1 version too)
operating system
Debian jessie
Related Collectd issue: collectd/collectd#2328