[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

Nagy Ferenc László report at bugs.python.org
Mon Jun 30 10:49:20 CEST 2008


Nagy Ferenc László <nflpython at irto.hu> added the comment:

> Can you please try this patch on top of the original patch?

It makes an infinite loop:

Traceback (most recent call last):
  File "F:\nfl\proxyhttps\test.py", line 8, in <module>
    response = urllib2.urlopen(req)
  File "C:\Python25\lib\urllib2.py", line 121, in urlopen
    return _opener.open(url, data)
  File "C:\Python25\lib\urllib2.py", line 377, in open
    req = meth(req)
  File "C:\Python25\lib\urllib2.py", line 1037, in do_request_
    scheme, sel = splittype(request.get_selector())
  File "C:\Python25\lib\urllib2.py", line 253, in get_selector
    return self.__r_host
  File "C:\Python25\lib\urllib2.py", line 215, in __getattr__
    return getattr(self, attr)
  File "C:\Python25\lib\urllib2.py", line 215, in __getattr__
    return getattr(self, attr)
  File "C:\Python25\lib\urllib2.py", line 215, in __getattr__
    return getattr(self, attr)
  File "C:\Python25\lib\urllib2.py", line 215, in __getattr__
    return getattr(self, attr)
  File "C:\Python25\lib\urllib2.py", line 215, in __getattr__
    return getattr(self, attr)
...

The test program was:

import urllib2

targeturl = 'https://www.paypal.com/'
proxyhost = 'proxy.xxxxxxxx.hu:3128'

req = urllib2.Request(targeturl)
req.set_proxy(proxyhost, 'https')
response = urllib2.urlopen(req)
print response.info()

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1424152>
_______________________________________


More information about the Python-bugs-list mailing list