curl-users
Re: gethostbyname_r(2)
Date: Thu, 17 Oct 2002 11:06:26 +0200
On Thu, 17 Oct 2002 09:28:11 +0200, Daniel Stenberg wrote about "Re: gethostbyname_r(2)":
> On Wed, 16 Oct 2002, Zvi Har'El wrote:
>
> > Second, I have a problem: When using curl without a proxy, it fails to
> > reolve the site address:
> >
> > ~$ curl --version
> > curl 7.10.1 (i686-pc-linux-gnu) libcurl/7.10.1 OpenSSL/0.9.6g zlib/1.1.4
> > ~$ curl -I http://www.google.com
> > * Couldn't resolve host 'www.google.com'curl: (6) Couldn't resolve host
> > * 'www.google.com'
>
> I find this very strange, since no one else has reported this and I figure it
> should hit quite a lot of people if this is truly a curl error.
>
> However, can you possibly set a break-point in Curl_getaddrinfo (hostip.c
> around line 510) and single-step forward until it fails and see what kind of
> error it detects?
>
> We use gethostbyname_r() for name resolves (where available), and this
> function is annoyingly badly documented.
I'll gladly do it and send you the reults.
>
> > ~$ export http_proxy=http://proxy:8080/
> > ~$ curl -I http://www.google.com
> > HTTP/1.0 302 Moved Temporarily
>
> It could resolve the proxy name at least!
the proxy is defined in /etc/hosts in my case. I also have no problems in
connecting to other sites whose names can be resolved by /etc/hosts lookup. The
problem is with the DNS lookup.
-- Dr. Zvi Har'El mailto:rl_at_math.technion.ac.il Department of Mathematics tel:+972-54-227607 Technion - Israel Institute of Technology fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942) Thursday, 11 Heshvan 5763, 17 October 2002, 11:03AM ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfmReceived on 2002-10-17