cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl with in C timeout / error

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 31 Mar 2008 11:00:39 -0700

On Mon, Mar 31, 2008 at 03:34:49PM +0200, Michal Marek wrote:
> curl_easy_perform will return one of the CURLE_* constants in case of
> error. What do you mean by good and bad urls? If you want to validate
> url syntax, then don't rely on libcurl -- it will try hard to make sense
> of any string you feed it ;-) If bad means "doesn't give any data" for
> you, then any nonzero return code indicates a bad url.

And keep in mind also that what you consider a "bad" URL is not necessarily
what libcurl considers a "bad" URL. If libcurl can contact the server and it
returns a response, that's "good", even if the response is an error code.
You need to use the CURLINFO_RESPONSE_CODE curl_easy_getinfo code to
differentiate between the two.

>>> Dan

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