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 jimr
Recipients demian.brecht, jimr, martin.panter
Date 2015-03-01.16:07:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>> My feeling is that '' implies "present but empty" (so should have a content-length set to zero), whereas None implies "missing" (so should only have a content-length header set to zero if the method is expecting a body.
> ...
> In light of that, I think that HTTPConnection(‘’).request(‘GET’, ‘/‘, ‘’) and HTTPConnection(‘’).request(‘GET’, ‘/‘) should result in identical headers with no Content-Length set.

I get your reasoning here, but I wonder if that goes beyond the scope of this issue? My initial thinking was the same, but then realised that was inconsistent with the current behaviour. For example, a GET with '' in the body already sets content-length: 0, but a GET with None for the body doesn't set a content length at all. I haven't changed this behaviour in my patch, except for PUT, POST, and PATCH where None and '' are now equivalent for those methods.
Date User Action Args
2015-03-01 16:07:09jimrsetrecipients: + jimr, martin.panter, demian.brecht
2015-03-01 16:07:09jimrsetmessageid: <>
2015-03-01 16:07:09jimrlinkissue23539 messages
2015-03-01 16:07:09jimrcreate