Andres Riancho <[email protected]> added the comment:
Please take a deeper look. I think you're trusting the "old code" more than my
bug report. Some things to keep in mind:
* The "headers" parameter is a dict. It will never have a getheaders method
* The If you search the whole urllib2.py file, you won't find instances of
headers.getheaders(), you'll find headers.get() , as expected when using a dict.
Also, the call chain to this method is:
* def error(self, proto, *args)
* meth_name = 'http_error_%s' % proto
* args = (dict, proto, meth_name) + args
* return self._call_chain(*args)
* Where args comes from:
error('http', request, response, code, msg, hdrs)
* And the hdrs variable is set here:
code, msg, hdrs = response.code, response.msg, response.info()
* And as you know, the response object returns a dict when info() is called.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11280>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com