Message236967
| 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 |
<1425226029.41.0.646585210296.issue23539@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
>> 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(‘example.com’).request(‘GET’, ‘/‘, ‘’) and HTTPConnection(‘example.com’).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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年03月01日 16:07:09 | jimr | set | recipients:
+ jimr, martin.panter, demian.brecht |
| 2015年03月01日 16:07:09 | jimr | set | messageid: <1425226029.41.0.646585210296.issue23539@psf.upfronthosting.co.za> |
| 2015年03月01日 16:07:09 | jimr | link | issue23539 messages |
| 2015年03月01日 16:07:09 | jimr | create |
|