Message227543
When connecting to a IIS server, it replies that:
Unauthorized Server: Microsoft-IIS/7.5
WWW-Authenticate: Digest qop="auth",algorithm=MD5-sess,nonce="+Upgraded+v1fe2ba746797cfd974e85f9f6dbdd6e514ec45becd2d8cf0112c764c676ad4a00f98517bb166e467dcad4b942254bd9b71d447e3529c509d2",charset=utf-8,realm="Digest"
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
Date: Thu, 25 Sep 2014 15:11:03 GMT
Connection: close
Content-Length: 0
which blew python 2.7 utllib2 like this:
File "tut2.py", line 23, in <module>
response = opener.open('https://exca010.encara.local.ads/ews/Services.wsdl')
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 524, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 1090, in http_error_401
host, req, headers)
File "/usr/lib64/python2.7/urllib2.py", line 973, in http_error_auth_reqed
return self.retry_http_digest_auth(req, authreq)
File "/usr/lib64/python2.7/urllib2.py", line 977, in retry_http_digest_auth
chal = parse_keqv_list(parse_http_list(challenge))
File "/usr/lib64/python2.7/urllib2.py", line 1259, in parse_keqv_list
k, v = elt.split('=', 1)
ValueError: need more than 1 value to unpack
urllib2 seems to assume that every www-authenticate header value will be a list of equal-signe-separated tuple.
On python3, the error is different and trigger this http://bugs.python.org/issue2202 (which is soon-to-be-fixed) |
|
Date |
User |
Action |
Args |
2014-09-25 15:48:51 | deronnax | set | recipients:
+ deronnax |
2014-09-25 15:48:51 | deronnax | set | messageid: <1411660131.7.0.581562777837.issue22496@psf.upfronthosting.co.za> |
2014-09-25 15:48:51 | deronnax | link | issue22496 messages |
2014-09-25 15:48:51 | deronnax | create | |
|