go to bug id or search bugs for
When using multiple curl_exec calls but using different CURLOPT_IPRESOLVE settings, the first setting takes effect regardless of what you set in the next calls.
Precondition: two hosts with IPv4 AND IPv6.
Place the script returning your remote address on one server and the test-script on the other. Execute the test-script.
The test-script eliminates cache-issues on both servers by using random additions to the URL fetched
CURLOPT_IPRESOLVE should take effect on each call, especially in combination with CURLOPT_FRESH_CONNECT
there is always the connection-type used which was used for the first connect
Add a Patch
Add a Pull Request
The cURL library caches hostname lookups (in additional to reusing connections).
You can disable it globally with CURLOPT_DNS_USE_GLOBAL_CACHE=false (default true), or individually set CURLOPT_DNS_CACHE_TIMEOUT=0 (default two minutes) for the cache entry to expire when you close the connection.
This solves it, thanks so much!