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, 05 Feb 2015 05:35:01 +0000
I am still not sure how to proceed..
See (man CURLOPT_RESOLVE) :
> Pass a pointer to a linked list of strings with host name resolve information to use for requests with this handle
This means "fake" entries should influence requests through _this_ handle only (I am not sure this is possible at all cause dns cache and "fake" entries are shared). But that would mean simply that all "fake" entries should be removed automatically without any extra CURLOPT_ setting once easy handle is closed/removed from multi. This is not the case now and this was not how I tried to fix it but that would fit my usecase perfectly.
But at the end it says :
Looks like it is implying that "fake" entries stay in that cache indefinitely independent of easy handle state until those entries are explicitly removed (this is the case now except for removal not implemented). In this case CULROPT_RESOLVE with minus entries should remove specified "fake" entries from global dns cache _before_ transfer takes place (so with the current behaviour of dns cache it means that I will have to remove "fake" entries for the current transfer in the next transfer (because they are not removed automatically) - not very convenient). Or maybe it means that it should cancel out previous "fake" entry set with CURLOPT_RESOLVE on _this_ handle (together with automatic removal of "fake" entries once easy handle is closed/removed)? That would make more sense. One minor question is what should be the behaviour in case of multiple interleaving CURLOPT_RESOLVE additions and removals for the same domain.
Could you please clarify which behaviour would be the most correct for the library from the user point of view and I will continue on the patch.
--- ** [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:** Fri Oct 24, 2014 09:42 AM 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 2015-02-05 These mail archives are generated by hypermail. |