cURL / Mailing Lists / curl-library / Single Mail

curl-library

[ curl-Bugs-845941 ] fetching https, curl returns code 56 on 407 from proxy (fwd)

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 24 Nov 2003 17:23:01 +0100 (CET)

Hi friends

I've just added a response on the bug report #845941 that concerns what
libcurl returns when failing to CONNECT through a proxy (due to bad
authentication).

I'm interested in more thoughts on this subject.

All details here:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=845941&group_id=976

My recent response:

Yes, it returns CURLE_RECV_ERROR and I would argue that it should instead
return some kind of AUTH error instead (when the proxy returns 407). It would
help users to understand what the error really means.

The reason this is different from normal "return OK" behavior of plain HTTP
pages is that connecting to and using a proxy is seen as part of the
connection phase. I claim that this is more of an error than getting a 404
back from a remote server is.

Also, that's why you don't get the proxy headers back the normal way. They're
not part of the remote server's headers, and if we provide them for the proxy
they will mix with the remote server's headers and it'll be confusing and
return different headers for users that happen to go through proxies.

But I recognize your problem and I do want to solve it. I just can't think of
any good way to do it using this mechanism without breaking existing
behavior... :-(

I think I need to give this some more thoughts.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-11-24