cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1579471 ] Fetching https, curl returns code 56 on 407 from proxy

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 18 Oct 2006 01:03:16 -0700

Bugs item #1579471, was opened at 2006-10-18 14:13
Message generated for change (Comment added) made by pcvarma
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1579471&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: PC Varma (pcvarma)
Assigned to: Daniel Stenberg (bagder)
Summary: Fetching https, curl returns code 56 on 407 from proxy

Initial Comment:
Proxy Details : MS ISA with NTLM and Baisc
Authentication mechanisms enabled.

libcURL version : 7.15.5

When fetching an https resource from a proxy that
requires authentication curl returns error CURLcode
56 (CURLE_RECV_ERROR) when the proxy responds with
a 407 (proxy authentication required).

This is the problematic as curl doesn't provide the
407 header making it impossible to extract the
challenge information necessary (auth method &amp;
realm) to re-fetch. It seems
that curl should return CURLE_OK and then provide the
407 header and body which would be consistent with
cURLs behavior given an http url.

----------------------------------------------------------------------

>Comment By: PC Varma (pcvarma)
Date: 2006-10-18 14:33

Message:
Logged In: YES
user_id=1394634

It is working witht that fix.

Its not a fix, its work around for this issue.

If sent a CONNECT methods request to Proxy without the
fields "Proxy Authentication" over https, its giving
CURLE_RECV_ERROR.

If i sent the same with "Proxy Authentication" its working
fine.

So i have added a few constants to return a unique value
i.e. the type of authentication in case of
CURLE_RECV_ERROR.

Constants added in the curl.h at the end.

  CURLAUTH_NONE_REQUIRED,
  CURLAUTH_BASIC_REQUIRED,
  CURLAUTH_DIGEST_REQUIRED,
  CURLAUTH_NTLM_REQUIRED,
  CURLAUTH_GSSNEGOTIATE_REQUIRED

Then imm. i will send the same request with "Proxy
Authentication" details by analyzing the return value for
previous request i.e. Auth type of the proxy.

Then it should work.

Hi libcURL Team, can you pls. confirm this once.? Thanks
in advance.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2006-10-18 14:28

Message:
Logged In: YES
user_id=1110

Please provide patches with diff -u

----------------------------------------------------------------------

Comment By: PC Varma (pcvarma)
Date: 2006-10-18 14:24

Message:
Logged In: YES
user_id=1394634

cURL is failing while reading the SSL content followed by
the "407" http response due to errors in a module that
handles the Open SSL and
auth manager.

    But we can easily fix the issue by sending a realm in
the CONNECT message
it self, then 407 won't be generate if the login
credentials are correct, if
login credentials are in-correct, then we need to connect
again thats the
common logic. To send the realm with the CONNECT message
we need to know with
type of authentication is supported by the proxy. So we
need to send a dummy
request first, so it will return with a 407 http response
and auth type(if the
proxy is not supporting no-auth, no problem).

   To make use of that dummy request for identifying the
auth type, send a
normal CONNECT req, if the proxy is supporting no-auth
thas good. no more
problems.

    If the proxy is supporting auth, then it will be
respond with a http
response code 407 with "auth type". so i modified the lib
cURL code to return
"auth type" then i will send the CONNECT again with
generated realm of type
"auth type". Then should work.

    It could't be a exact fix for this problem, but this
is a could be a better
fix for this issue.

I have attached code modified for this fix. If you guys
have concerns please write to me on pc.varma_at_hotmail.com

Thanks.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2006-10-18 14:24

Message:
Logged In: YES
user_id=1110

Correct, this is a duplicate of KNOWN_BUGS #25

Yes, I'd be interested in a fix.

----------------------------------------------------------------------

Comment By: PC Varma (pcvarma)
Date: 2006-10-18 14:14

Message:
Logged In: YES
user_id=1394634

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

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1579471&group_id=976
Received on 2006-10-18

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET