cURL / Mailing Lists / curl-users / Single Mail

curl-users

HTTPS GET/POST through a proxy with authentication fails. BUG#25 related?

From: Lau, Hang Kin <hklau_at_avistar.com>
Date: Fri, 23 Feb 2007 12:14:48 -0800

I was trying to use libcurl (version 7.16.1) to connect to an HTTPS
server through a proxy with authentication. The process subsequently
failed and the cause seems to be a disconnection from the proxy server
after the first CONNECT request. The logs are as follows:
 
About to connect() to proxy x.x.x.x port 8088 (#0)
  Trying x.x.x.x...
TCP_NODELAY set
connected
Connected to x.x.x.x (x.x.x.x) port 8088 (#0)
Establish HTTP proxy tunnel to www.xyz.com:443
==> CONNECT www.xyz.com:443 HTTP/1.0
Host: www.xyz.com:443
Proxy-Connection: Keep-Alive
User-Agent: XYZ
Content-Type: application/octet-stream
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache,no-store,no-transform
Pragma: no-cache
Connection: Keep-Alive
 
<== HTTP/1.0 407 Unauthorized

<== Server: CCProxy
<== Proxy-Authenticate: Basic realm="CCProxy Authorization"
<== Cache-control: no-cache
<==
=== Info: Proxy auth using Basic with user 'Administrator'
==> CONNECT www.xyz.com:443 HTTP/1.0
Host: www.xyz.com:443
Proxy-Authorization: Basic [...]
Proxy-Connection: Keep-Alive
User-Agent: XYZ
Content-Type: application/octet-stream
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache,no-store,no-transform
Pragma: no-cache
Connection: Keep-Alive

Proxy CONNECT aborted
Closing connection #0
failure when receiving data from the peer

 
The communication ends here and the https server never got anything from
the POST. However, if I then try to reuse the same handle for the
GET/POST request, the appropriate credentials were sent to the proxy and
the connection to the https server works.
 
Also, if I tell libcurl to use BASIC authentication at the beginning,
the POST/GET works right away since the credentials were sent in the
first request.
 
Does anyone have similar experience in version 7.16.1 ? Since BUG#25
should have been fixed in this version and the above behavior looks
really like BUG#25 to me.
 
Thanks.
Received on 2007-02-23