-
Committer:
Vincent Ladeuil
-
Date:
2007-06-22 07:56:02 UTC
-
Revision ID:
v.ladeuil+lp@free.fr-20070622075602-1kk9gdry92v2usq3
Rough, working, tested against squid+apache in basic auth fix for #120678
* bzrlib/transport/http/_urllib2_wrappers.py:
(Response.begin): Don't close the connection after a successful
CONNECT (grr).
(HTTPConnection.__init__, HTTPSConnection.__init__): Add a
proxied_host parameter. This is ugly and should be refactored.
(HTTPSConnection.connect, HTTPSConnection.connect_to_origin):
Split the httplib.HTTPSConnection so that we can issue a CONNECT
request *before* swithing the socket to ssl mode.
(Request.set_proxy): Trap the proxy setting to preserve the
original host.
(ConnectRequest): New specific request.
(ConnectRequest.set_proxy): Trap the proxy setting again to avoid
losing the original host (ugly).
(HTTPSHandler.https_request): Wow, we really need https tests,
https requests common headers were never set :-/
(HTTPSHandler.https_open): When connecting through a proxy, the
first request should be a CONNECT to establish the encrypted link.