[New-bugs-announce] [issue3276] httplib.HTTPConnection._send_request should not blindly assume dicts for headers
toxik
report at bugs.python.org
Fri Jul 4 02:19:29 CEST 2008
New submission from toxik <ludvig.ericson at users.sourceforge.net>:
Presently it's impossible to use httplib.HTTPConnection.request and send
the several headers with the same name. This is because _send_request
assumes a dict is passed in, or a dict-like interface. Obviously one could
make a list subclass or some such and give it an iteritems that returns
itself, but IMHO the solution is to fix httplib.
Attached patch changes the current behavior to using iteritems only if it
exists, otherwise iterate directly (which would fit with sequences of two-
tuples).
----------
components: Library (Lib)
files: httplib.py.diff
keywords: patch
messages: 69234
nosy: ludvig.ericson
severity: normal
status: open
title: httplib.HTTPConnection._send_request should not blindly assume dicts for headers
versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5
Added file: http://bugs.python.org/file10807/httplib.py.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3276>
_______________________________________
More information about the New-bugs-announce
mailing list