New submission from toxik <[EMAIL PROTECTED]>: 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue3276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com