curl-library
Re: Networking Question : Windows vs *Unix
Date: Tue, 26 Aug 2014 23:18:20 +0200 (CEST)
On Tue, 26 Aug 2014, Jon Torrey wrote:
> Recently, I have written an application which uses the same code but does
> not behave normally. Curl fails to resolve the hostname.
On which "unix" and which curl version?
> However, while debugging, I see curl calls gethostname() and gethostbyname()
> functions as well as gethostbyaddr()
No, gethostbyaddr is not used by libcurl. getaddrinfo() is though, if
configure detects such a function.
> What is very interesting, if I try to do a gethostbyname("google.com"), I
> get an IP just fine. If I do a gethostbyname() of the URL stated below, I
> get jibberish output.
You mean in a stand-alone program using these functions or only when used with
curl?
> NOTE: my OS does not have ares.h
C-ares is portable to basically all platforms that can build and run curl so
you _could_ probably use c-ares too if you really wanted to.
> Below is the output of curl. I starred out some content of the URL for
> security and privacy reasons but for clarification, they are normal ASCII
> a-z characters.
>
> I/O: * Curl_ipv4_resolve_r failed for dev1.***dev.com
Ok, an old-style gethostbyname_r call. Did configure detect the correct *_r
version for you?
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-08-26