What steps will reproduce the problem?
>>> import httplib2
>>> h = httplib2.Http()
>>> h.request('http://evolution.telligent.com/')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "httplib2/__init__.py", line 1050, in request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "httplib2/__init__.py", line 863, in _request
for authorization in self._auth_from_challenge(host, request_uri,
headers, response, content):
File "httplib2/__init__.py", line 798, in _auth_from_challenge
challenges = _parse_www_authenticate(response, 'www-authenticate')
File "httplib2/__init__.py", line 231, in _parse_www_authenticate
(auth_scheme, the_rest) = authenticate.split(" ", 1)
ValueError: need more than 1 value to unpack
What is the expected output? What do you see instead?
It's expected that httplib2 doesn't authenticate, but return 401, since it
has no support for NTLM. Instead it crashes because the server sends
'WWW-Authenticate: NTLM' in headers, whereas the httplib2 code expects that
space character is in the header. I'm attaching a patch that makes the
error go away, but I'm not really sure of it's correctness. I'm mostly
reporting this bug to acknowledge that a bug exists.
What version of the product are you using? On what operating system?
httplib2 revision is 60c4e6c92e, using Ubuntu Jaunty.
Original issue reported on code.google.com by zelo.z...@gmail.com on 8 Sep 2009 at 4:36
Original issue reported on code.google.com by
zelo.z...@gmail.com
on 8 Sep 2009 at 4:36Attachments: