Message95058
urllib2 cannot handle https with proxy requiring authorization.
After https_proxy is set correctly,
Python 2.6.4 (r264:75706, Oct 29 2009, 15:38:25)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> c=urllib2.urlopen("https://sourceforge.net")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 389, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 407, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1154, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error Tunnel connection failed: 407 Proxy
Authentication Required>
This is because HTTPConnection::_tunnel() in httplib.py doesn't send
Proxy-Authorization header. |
|
Date |
User |
Action |
Args |
2009-11-09 04:38:18 | tsujikawa | set | recipients:
+ tsujikawa |
2009-11-09 04:38:18 | tsujikawa | set | messageid: <1257741498.16.0.683281197284.issue7291@psf.upfronthosting.co.za> |
2009-11-09 04:38:16 | tsujikawa | link | issue7291 messages |
2009-11-09 04:38:15 | tsujikawa | create | |
|