curl-library
Re: Incorrect file download on proxy authentication failure
Date: Thu, 23 Oct 2008 17:15:54 +0200
On Thu, Oct 23, 2008 at 09:04:18AM +0200, Daniel Stenberg wrote:
> 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...
Hmmm, I don't see any point in returning CURLE_OK when the proxy did not
let you through to the remote server. Do you have an example where this
way would actually make sense?
Received on 2008-10-23