cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl issue with IPv6 and c-ares

From: Daniel Johnson <daniel.johnson31_at_gmail.com>
Date: Sat, 1 Nov 2008 19:24:35 -0400

On Nov 1, 2008, at 2:33 PM, Daniel Stenberg wrote:

> On Sat, 11 Oct 2008, Daniel Johnson wrote:
>
>>> From a pragmatic point of view it might be easier to teach libcurl
>>> to make two separate ares queries in this case. Would you like to
>>> try making a patch for that?
>>
>> I had thought about this and agree that it would solve the problem,
>> but wasn't sure if it was the best solution. I'll look at the code
>> and see if I can come up with something.
>
> Did you get anywhere on this road?

I'm afraid not. It looks like changing libcurl to call cares twice is
just as complicated as fixing cares to lookup both addresses. Due to
the asynchronous nature of the lookups, simply doing two lookups would
be insufficient since the results could come back at any time. You
would need a lot of additional logic to wait for both lookups to
return and then combine them. I couldn't think of an easy way to do it
and it kind of defeats the purpose of asynch lookups anyway. At least
that's how I understand what's going on. Sorry.

Daniel
Received on 2008-11-02