You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-06-20.23:05:01.602>created_at=<Date2008-07-04.00:19:28.012>labels= ['invalid', 'type-feature', 'library']
title='httplib.HTTPConnection._send_request should not blindly assume dicts for headers'updated_at=<Date2021-06-20.23:05:01.601>user='https://bugs.python.org/ludvigericson'
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).
This is a feature request for now old versions. It would have to be reformulated as a feature request for a 3.2 module. I do not see the dict (mapping now?) requirement being changed.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: