This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kanzure
Recipients kanzure, orsenthil, pitrou
Date 2013-01-01.18:30:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357065011.61.0.0713056005716.issue16830@psf.upfronthosting.co.za>
In-reply-to
Content
On Tue, Jan 1, 2013 at 5:41 AM, Antoine Pitrou wrote:
> Another possibility would be to allow passing None in values of the `headers` dict, in which case the given header wouldn't be send at all.

I agree that your solution is more scaling-friendly than the patch I originally submitted. But from another perspective, consider how alien it is to have to explicitly add keys set to None in the headers to get desired behavior.

Maybe there could be a single flag "strict" (or possibly a better name) that would indicate that the dict is in fact what I want to send and that it should not be modified? Or perhaps there should be "base_headers" list (not a dictionary) of header keys of which defaults to not inject?

Also, would making {"Accept-Encoding": None} send no "Accept-Encoding" header be backwards incompatible with the current behavior?
History
Date User Action Args
2013-01-01 18:30:11kanzuresetrecipients: + kanzure, orsenthil, pitrou
2013-01-01 18:30:11kanzuresetmessageid: <1357065011.61.0.0713056005716.issue16830@psf.upfronthosting.co.za>
2013-01-01 18:30:11kanzurelinkissue16830 messages
2013-01-01 18:30:11kanzurecreate