[issue14721] httplib doesn't specify content-length header for POST requests without data

Arve Knudsen report at bugs.python.org
Fri May 4 20:12:09 CEST 2012


Arve Knudsen <arve.knudsen at gmail.com> added the comment:

Actually, when inspecting the HTTP requests sent by Chrome for the different methods (a great little Chrome app called Postman let me fire requests manually), I found that content-length would be set for most methods. I could confirm that 'content-length: 0' would be set for the following methods: POST, PUT, PATCH, DELETE and HEAD.

I guess it should be good enough to model that behaviour in httplib?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14721>
_______________________________________


More information about the Python-bugs-list mailing list