cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Proxy changes between transfers doesn't take effect immediately when using same handle

From: BoBo via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 25 Apr 2016 18:56:05 +0000 (UTC)

Thanks for the reply.
Your explanation clears things up.

One thing that still interests me is: is there some default expiration time for the cache? Because I don't see that issue if I wait for 2 minutes.
Thanks.

    On Saturday, April 23, 2016 3:29 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
 

 On Sat, 23 Apr 2016, Ray Satiro via curl-library wrote:

> I think the reason it fails when 81 is because it's looking in the DNS cache
> for test.com port 81 and sees it doesn't exist whereas test.com port 80
> exists.

The port number is a clue, yes. The problems seems like a regression
introduced in 09b5a998 and happens because Curl_fetch_addr() is used to see if
anyone else has resolved the name and it asks for... the host name and not the
proxy name. And since the host name is already in the cache, it takes that and
continues!

I'm attaching a simple little patch that fixes it for me. It also changes the
"Hostname was found in DNS cache" logging a bit in a way that would've made it
easier for us to spot this problem.

Thoughts? (silence is fine, and then I'll push this soonish)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
  

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-25