cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1431 removing names from DNS cache with CURLOPT_RESOLVE is not implemented

From: ygrek <ygreks_at_users.sf.net>
Date: Thu, 23 Oct 2014 23:00:39 +0000

> I see, but I don't think that matches the description of how - works. Of course, as it isn't implemented I'll be OK with redefining the meaning.

That's why I am asking, because I do not know how it is intended to work, esp. so as it is a TODO %)

> If so, I would suggest that you make loadhostpairs create a separate removal-list for all strings that start with a dash, and then you run through that removal-list and delete the entries again when the handle is closed/removed from multi.

I am not sure why separate list is needed, if the user wants to change dns cache with curlopt_resolve after the transfer, then we should store everything in the cache, be it removal or adding new domains, so my suggestion would be just to run loadhostpairs when the handle is closed/removed from multi. IIUC CURLOPT_RESOLVE is special compared to other options because it manipulates not the curl handle itself, but other "global" entity (dns cache), and looks like ideal solution would be to call loadhostpairs immediately when this option is set, regardless of transfer (but maybe that's not valid because of some other considerations I have missed).

---
** [bugs:#1431] removing names from DNS cache with CURLOPT_RESOLVE is not implemented**
**Status:** open-confirmed
**Labels:** dns memory leak 
**Created:** Tue Oct 07, 2014 09:19 AM UTC by ygrek
**Last Updated:** Thu Oct 23, 2014 06:49 PM UTC
**Owner:** Daniel Stenberg
Removing names from DNS cache with CURLOPT_RESOLVE is not implemented (see TODO in Curl_loadhostpairs). With the fix 31860ab for https://sourceforge.net/p/curl/bugs/1327/ it means that constantly adding and deleting hostcache entries with CURLOPT_RESOLVE creates a memory leak, as such entries are never removed (nor by request nor automatically).
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-10-24

These mail archives are generated by hypermail.