curl-library
Re: libcurl with in C timeout / error
From: Michal Marek <mmarek_at_suse.cz>
Date: Mon, 31 Mar 2008 15:34:49 +0200
Date: Mon, 31 Mar 2008 15:34:49 +0200
Thomas Bonham wrote:
> Yes I'm using curl_easy_perform() and if it is good url it prints all
> of the html and if it is a bad one then it prints nothing. So if it
> returns "bad" then how can I put the code if it is good or bad.
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.
Michal
Received on 2008-03-31