curl-library
Re: strange "Couldn't resolve host" error
Date: Tue, 7 Jan 2003 08:46:55 +0100 (MET)
On Mon, 6 Jan 2003, Michael McFarland wrote:
> 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?
It certainly does sound reasonable, yes.
> 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?
Only if you switch off FOLLOWLOCATION and get the page again.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.comReceived on 2003-01-07