Message108330
Apparently, the failure on OSX is due to the fact that urllib.proxy_bypass('localhost') returns True. This makes the opener to bypass the ProxyHandler that is explicitly set up to use the correct server port:
def setUp(self):
..
proxy_url = "http://127.0.0.1:%d" % self.server.port
handler = urllib2.ProxyHandler({"http" : proxy_url})
self.proxy_digest_handler = urllib2.ProxyDigestAuthHandler()
self.opener = urllib2.build_opener(handler, self.proxy_digest_handler)
instead, the opener skips to the default HTTPHandler which attempts to connect on port 80 with sad results.
Interestingly,
>>> urllib.proxy_bypass('127.0.0.1')
False
So the simplest fix is s/localhost/127.0.0.1/ as done in the attached patch (issue8455.diff). |
|
Date |
User |
Action |
Args |
2010-06-22 00:37:15 | belopolsky | set | recipients:
+ belopolsky, db3l, ronaldoussoren, mark.dickinson, vstinner, ned.deily |
2010-06-22 00:37:15 | belopolsky | set | messageid: <1277167035.04.0.28245527429.issue8455@psf.upfronthosting.co.za> |
2010-06-22 00:37:13 | belopolsky | link | issue8455 messages |
2010-06-22 00:37:12 | belopolsky | create | |
|