[issue15701] AttributeError from HTTPError when using digest auth

Jody McIntyre report at bugs.python.org
Thu Aug 16 22:35:57 CEST 2012


New submission from Jody McIntyre:

I attempted to connect to a site using urllib2 and digest authentication and it raised an HTTPError (due to an incorrect username and password, which is expected).  I attempted to run the info() method of the HTTPError to get more information, but it failed with an AttributeError (this is the bug).

$ ./reproducer.py 
Traceback (most recent call last):
  File "./reproducer.py", line 16, in <module>
    print e.info()
  File "/usr/lib/python2.6/urllib.py", line 987, in info
    return self.headers
AttributeError: 'HTTPError' object has no attribute 'headers'

$ python --version
Python 2.6.6

----------
files: reproducer.py
messages: 168407
nosy: scjody
priority: normal
severity: normal
status: open
title: AttributeError from HTTPError when using digest auth
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file26864/reproducer.py

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


More information about the Python-bugs-list mailing list