cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unable to get HTTP Status 407 when using libcurl with proxy and h ttps

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Aug 2003 19:17:38 +0200 (CEST)

On Fri, 8 Aug 2003, Lance Munslow wrote:

> When using a proxy and HTTPS the Curl_ConnectHTTPProxyTunnel() func is
> called within Curl_http_connect(). When I provide invalid auth details the
> 407 generated reaches here in ConnectHTTPProxyTunnel():
>
> if(200 != httperror) {
> if(407 == httperror)
> /* Added Nov 6 1998 */
> failf(data, "Proxy requires authorization!");
> else
> failf(data, "Received error code %d from proxy", httperror);
> return CURLE_RECV_ERROR;
> }
>
> How can I get at the 407 from the proxy?
>
> Using:
> curl_easy_getinfo(m_curl, CURLINFO_HTTP_CODE, ...)
> returns 0.
>
> When not using HTTPS ConnectHTTPProxyTunnel() is not called and everything's
> as expected.
>
> Any help is appreciated.

This is a bug that should be fixed.

Can you make a fix for this and mail us the diff?

I figure a proper fix would introduce a new info variable, separately from the
HTTP_CODE one, letting that one continue to work for the remote server's reply
only.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-08