cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3491697 ] Use https to connect to ipv6 server with proxy failed.

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 22 Feb 2012 21:48:02 -0800

Bugs item #3491697, was opened at 2012-02-22 21:48
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3491697&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: https
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Daniel Stenberg (bagder)
Summary: Use https to connect to ipv6 server with proxy failed.

Initial Comment:
HI,

I failed to get data with https protocol from ipv6 server with ipv6 proxy.
The error code is: curl: (56) Received HTTP code 400 from proxy after CONNECT

* Command:
curl -v -g -6 --ssl --proxy [1:2:3:4:5:6:7:7a]:8080 https://[1:2:3:4:5:6:7:41]/?test

* Console Message
* About to connect() to proxy 1:2:3:4:5:6:7:7a port 8080 (#0)
* Trying 1:2:3:4:5:6:7:7a...
* connected
* Connected to 1:2:3:4:5:6:7:7a (1:2:3:4:5:6:7:7a) port 8080 (#0)
* Establish HTTP proxy tunnel to1:2:3:4:5:6:7:41:443
> CONNECT 1:2:3:4:5:6:7:41:443 HTTP/1.1
> Host: 1:2:3:4:5:6:7:41:443
> User-Agent: curl/7.24.0 (i386-pc-win32) libcurl/7.24.0 OpenSSL/1.0.0a
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 400 Bad Request
< Date: Thu, 23 Feb 2012 03:43:17 GMT
< Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8o
< Content-Length: 226
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
* Received HTTP code 400 from proxy after CONNECT
* Closing connection #0
curl: (56) Received HTTP code 400 from proxy after CONNECT

* curl version:
curl 7.21.4 (i386-pc-win32) libcurl/7.21.4 OpenSSL/1.0.0a
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM SSL SSPI

* OS: Windows XP

I guess that's because the "Host" information in header is incorrect.
There should be brackets for the ipv6 address.

We could see the difference in Apache2 proxy's log too.
(There is no brackets for the ipv6 address.)
- Query by curl:
  "CONNECT 1:2:3:4:5:6:7:41:443 HTTP/1.1" 400 226
- Query by browser:
  "CONNECT [1:2:3:4:5:6:7:41]:443 HTTP/1.0" 200 -

By the way, other kinds of connection is OK:
1. Use https to connect to ipv6 server without proxy
  curl -v -g -6 --ssl https://[1:2:3:4:5:6:7:41]/?test
2. Use https to connect to ipv4 server with proxy
  curl -v -g --ssl --proxy [1:2:3:4:5:6:7:7a]:8080 https://4.3.2.1/?test
3. Use http to connect to ipv6 server with proxy
  curl -v -g -6 --ssl --proxy [1:2:3:4:5:6:7:7a]:8080 http://[1:2:3:4:5:6:7:41]/?test
  The log in proxy is;
    "GET http://[1:2:3:4:5:6:7:41]/?test HTTP/1.1" 200 4

Only use "https" to connect to "ipv6" server with "proxy" failed.

Could you please help with the problem?
Thanks.

Regards,
Blacat

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3491697&group_id=976
Received on 2012-02-23

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET