[#1303] reports an issue (now fixed) where libcurl would prune CURLOPT_RESOLVE entries after the DNS cache timeout had elapsed.
It looks like the patch is not complete, though. As of version 7.34.1-dev entries are still being incorrectly removed in the following scenario:
The attached program is basically the same one attached to bug report [#1303], except it connects to a server which keeps the connection alive for a short time (debian.org), instead of the other one, which always signaled the client to close it.
Here's the output:
Test started with libcurl/7.34.1-DEV OpenSSL/1.0.1e zlib/1.2.8 libidn/1.28 librtmp/2.3 debug: Added fake.host:80:188.8.131.52 to DNS cache debug: Rebuilt URL to: http://fake.host/ debug: Hostname was found in DNS cache debug: Trying 184.108.40.206... debug: Connected to fake.host (220.127.116.11) port 80 (#0) debug: Server Apache is not blacklisted debug: Connection #0 to host fake.host left intact HTTP transfer completed with status 0 Sleeping for 20 seconds... debug: Added fake.host:80:18.104.22.168 to DNS cache debug: Rebuilt URL to: http://fake.host/ debug: Found bundle for host fake.host: 0xcacc20 debug: Connection 0 seems to be dead! debug: Closing connection 0 debug: Hostname was NOT found in DNS cache debug: getaddrinfo(3) failed for fake.host:80 debug: Couldn't resolve host 'fake.host' debug: Closing connection 1 HTTP transfer completed with status 6