cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Incorrect file download on proxy authentication failure

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Oct 2008 09:04:18 +0200 (CEST)

On Wed, 22 Oct 2008, Dan Fandrich wrote:

> libcurl considers the reception of an error page from the proxy or server as
> a successful transfer, so it returns CURLE_OK. If you want to get the HTTP
> error code, get it with CURLINFO_RESPONSE_CODE using curl_easy_getinfo

I'm not sure that is the most sensible approach to this though.

When you're trying to get a resource from a remote server and the proxy
doesn't let libcurl through, it could arguably be seen as a connect problem
and thus subject for a proper return code.

I think I've had a mixed opinion on this in the past and there are probably
still sitatuations where both ways make sense...

-- 
  / daniel.haxx.se
Received on 2008-10-23