]> granicus.if.org Git - python/commit
#23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.
authorR David Murray <rdmurray@bitdance.com>
Sun, 22 Mar 2015 19:18:23 +0000 (15:18 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sun, 22 Mar 2015 19:18:23 +0000 (15:18 -0400)
commitbeed8402ca2b44681f939238c8ea02deeb8a06a2
treef5169d001eff31904177045e7046445497acffba
parent75ed90a4cf07cd9236b4ed52d1c7cf09810a1749
#23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.

Some http servers will reject PUT, POST, and PATCH requests if they
do not have a Content-Length header.

Patch by James Rutherford, with additional cleaning up of the
'request' documentation by me.
Doc/library/http.client.rst
Lib/http/client.py
Lib/test/test_httplib.py
Misc/ACKS
Misc/NEWS