curl-library
RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN
Date: Mon, 29 Aug 2011 18:28:46 +0100
Hi Daniel,
> Argh, that's correct. We don't have anything in libcurl before this >
> If we decide not to modify Curl_resolv()'s underlying functions
> then I would still recommend we modify the output of
> Curl_gethostname() so it returns a defined value
I don't know if you had any more thoughts about how the SMTP module should
provide the fully qualified domain name to the connected server, but in the
meantime I have prepared a patch for you that fixes Curl_gethostname() so
that it always returns a defined output regardless of socket provider.
The code checks for a full stop (period / dot) and only copies what is
before it to the output buffer - this is essentially what the code in
Curl_ntlm_msgs.c is doing. If you see fit to push this patch then we can
tidy up the relevant code in NTLM afterwards as it does not presently break
that code.
Kind Regards
Steve
Received on 2011-08-29