cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_getinfo problem : to retrieve the http error codes

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 4 Dec 2007 10:45:46 -0800

On Tue, Dec 04, 2007 at 08:03:39PM +0530, Shilpi Aggarwal wrote:
> curl_easy_getinfo :: ideally should return HTTP error codes with
> CURLINFO_HTTP_CONNECTCODE flag supplied as its parameter.
> I have gone through this thread of yours :
>
> Re: CURLINFO_HTTP_CONNECTCODE problem
>
> Tried using CURLOPT_HTTPPROXYTUNNEL set and then curl_easy_getinfo but it
> always returns 0 even if the server is down. It never returns the expected
> error code (Infact, doesnt return any error code). Always 0 is returned in the
> third parameter of this function.
> Is this a known bug or am i doing something wrong ?

What error code do you expect a server that is down to return? It can't,
naturally, so 0 makes sense in that context. The return code from
curl_easy_perform() will tell you about errors connecting to the server.

>>> Dan

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