cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Cannot resolve localhost or 127.0.0.1

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 11 Jan 2008 11:39:21 -0800

On Fri, Jan 11, 2008 at 11:17:45AM -0800, weiping guo wrote:
> Sorry, my bad. My original code looks like this.
>
> char url[REQUEST_LEN*2];
> memset(url,0, REQUEST_LEN*2);
> int n = sprintf(url, "http://%s:%d/%s?%s", this->ip_, this->port_, this->url_, request);
>
> It seems that curl is trying to cache the DNS entry. For the first time to call this function, it always return an error. Subsequent calls never fail.

If you are passing in IP addresses directly, there's nothing to cache.
Have you tried logging the URL you pass in to curl each time to make sure
that it's what you expect each time through?

And this is really a libcurl question that is better handled on the libcurl
mailinglist.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-01-11

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET