cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 11 Aug 2011 19:56:08 +0100

Hi Daniel,

> > So, to resolve a host name within libcurl we're pretty much forced to
> > use Curl_resolv() or probably even Curl_resolv_timeout() so that
> > timeouts are properly acknowledged.

> Okay - I will look at these and work on a solution

I have had an attempt at trying to use Curl_resolv() and
Curl_resolv_timeout() but unfortunately the CANONICAL name is always empty.
It would appear that the underlying Curl_resolver_getaddrinfo() does not set
the ai_flags to include: AI_CANONNAME :(

I have attached my version of Curl_gethostname.c and .h so would really
appreciate your guidance on this.

Cheers

Steve

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

Received on 2011-08-11