|
|
df5665 |
diff -urN M2Crypto/M2Crypto/httpslib.py M2Crypto-0.21.1/M2Crypto/httpslib.py
|
|
|
df5665 |
--- M2Crypto/M2Crypto/httpslib.py 2012-03-15 03:27:22.181524406 +0100
|
|
|
df5665 |
+++ M2Crypto-0.21.1/M2Crypto/httpslib.py 2012-03-15 03:27:40.467485033 +0100
|
|
|
df5665 |
@@ -182,14 +182,14 @@
|
|
|
df5665 |
else:
|
|
|
df5665 |
HTTPSConnection.putheader(self, header, value)
|
|
|
df5665 |
|
|
|
df5665 |
- def endheaders(self):
|
|
|
df5665 |
+ def endheaders(self, *args, **kwargs):
|
|
|
df5665 |
# We've recieved all of hte headers. Use the supplied username
|
|
|
df5665 |
# and password for authorization, possibly overriding the authstring
|
|
|
df5665 |
# supplied in the headers.
|
|
|
df5665 |
if not self._proxy_auth:
|
|
|
df5665 |
self._proxy_auth = self._encode_auth()
|
|
|
df5665 |
|
|
|
df5665 |
- HTTPSConnection.endheaders(self)
|
|
|
df5665 |
+ HTTPSConnection.endheaders(self, *args, **kwargs)
|
|
|
df5665 |
|
|
|
df5665 |
def connect(self):
|
|
|
df5665 |
HTTPConnection.connect(self)
|
|
|
df5665 |
diff -urN M2Crypto/M2Crypto/m2urllib2.py M2Crypto-0.21.1/M2Crypto/m2urllib2.py
|
|
|
df5665 |
--- M2Crypto/M2Crypto/m2urllib2.py 2011-01-15 20:10:05.000000000 +0100
|
|
|
df5665 |
+++ M2Crypto-0.21.1/M2Crypto/m2urllib2.py 2012-03-15 03:27:40.467485033 +0100
|
|
|
df5665 |
@@ -64,8 +64,10 @@
|
|
|
df5665 |
target_host = urlparse.urlparse(full_url)[1]
|
|
|
df5665 |
|
|
|
df5665 |
if (target_host != host):
|
|
|
df5665 |
+ request_uri = urlparse.urldefrag(full_url)[0]
|
|
|
df5665 |
h = httpslib.ProxyHTTPSConnection(host = host, ssl_context = self.ctx)
|
|
|
df5665 |
else:
|
|
|
df5665 |
+ request_uri = req.get_selector()
|
|
|
df5665 |
h = httpslib.HTTPSConnection(host = host, ssl_context = self.ctx)
|
|
|
df5665 |
# End our change
|
|
|
df5665 |
h.set_debuglevel(self._debuglevel)
|
|
|
df5665 |
@@ -80,7 +82,7 @@
|
|
|
df5665 |
# request.
|
|
|
df5665 |
headers["Connection"] = "close"
|
|
|
df5665 |
try:
|
|
|
df5665 |
- h.request(req.get_method(), req.get_selector(), req.data, headers)
|
|
|
df5665 |
+ h.request(req.get_method(), request_uri, req.data, headers)
|
|
|
df5665 |
r = h.getresponse()
|
|
|
df5665 |
except socket.error, err: # XXX what error?
|
|
|
df5665 |
raise URLError(err)
|