cURL / Mailing Lists / curl-library / Single Mail


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

From: Steve Holme <>
Date: Thu, 11 Aug 2011 17:18:44 +0100

Hi Daniel,

On Thu, 11 Aug 2011, Steve Holme wrote:

> Ok, yes I can see how this is necessary for some uses of this function.
> I would however suggest that we add an option to the function so
> that we don't spend time to lookup the full name, possibly using a
> slow DNS server, only to have the calling code strip off the domain
> again!

Yep we could do, and I know I'm stating the obvious here, the function would
also have to check for the presence of the "." (as we do not know if the
hostname is FQDN or not) and strip of the domain if the option was passed

> Welcome to a world of pain. :-)

Arrgghh - Have I opened up another can of worms?

> 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. The only issue is my
NTLM rework and SMTP AUTH NTLM solutions will need to be modified. Should we
try and push a fix out for this before or after those?



List admin:
Received on 2011-08-11