cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: strange "Couldn't resolve host" error

From: Michael McFarland <sidlon_at_yahoo.com>
Date: Mon, 6 Jan 2003 11:06:58 -0800 (PST)

   I had been using (py)curl 7.9 because at the time I
got started there wasn't an rpm created for libcurl
7.10, but I'll give that a try now.

   From what I've figured out so far, the problem only
occurs if I have 'pycurl.FOLLOWLOCATION' set. It
seems like perhaps the server is providing a Location
header to the server's hostname, a domain which for
some reason my local DNS server can't resolve. So
curl fetches the page I requested (by IP), and sees a
'Location' header and tries to redirect. It can't
resolve that host, so it throws the "Couldn't resolve
host" error. Does that seem like a reasonable
explanation?

   If so, assuming this is still the standard behavior
w/ 7.10, would there be a way to configure my curl
instance to just return the initial page (and not
raise an exception) if there was a problem fetching
the re-direct page?

  - Michael

--- Kjetil Jacobsen <kjetilja_at_cs.uit.no> wrote:
> On Mon, 2003-01-06 at 12:14, Daniel Stenberg wrote:
> > On Tue, 31 Dec 2002, Michael McFarland wrote:
> >
> > > I have a program written using pycurl which
> is consistently producing
> > > what seems like an unusual error. When
> accessing a particular URL of the
> > > form 'https://12.34.56.7/xyz', I get a curl
> exception #6: "Couldn't
> > > resolve host 'www2.foo.net'".
> > >
> > > It seems unusual to me that there would be a
> DNS issue when I'm
> > > accessing the site by IP. Anyone have a spare
> clue on what could be
> > > happening? I'm using libcurl 7.9.8 w/ SSL and
> pycurl 7.9.8.4 on a redhat
> > > 7.3 system.
> >
> > This looks like a bug somewhere, yes.
> >
> > Is there any particular reason why you don't run
2> the latest version of the
> > tools? It might be a good start to see if this is
> already fixed.
> >
> > I suspect that this problem is in the Pycurl code.
> >
> > Any clues Kjetil?
>
> not sure about this one. i need some more
> information (which options
> are set and so on). obviously, the best would be
> code which reproduces
> the problem.
>
> also, there has been some bugfixes in the
> curl/pycurl releases following
> 7.9.8.4 which might fix the problem.
>
> regards,
>
> - kjetil
>

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-01-06