diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-03-22 19:18:23 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-03-22 19:18:23 (GMT) |
commit | beed8402ca2b44681f939238c8ea02deeb8a06a2 (patch) | |
tree | f5169d001eff31904177045e7046445497acffba /Misc | |
parent | 75ed90a4cf07cd9236b4ed52d1c7cf09810a1749 (diff) | |
download | cpython-beed8402ca2b44681f939238c8ea02deeb8a06a2.zip cpython-beed8402ca2b44681f939238c8ea02deeb8a06a2.tar.gz cpython-beed8402ca2b44681f939238c8ea02deeb8a06a2.tar.bz2 |
#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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -1179,6 +1179,7 @@ Sam Rushing Mark Russell Rusty Russell Nick Russo +James Rutherford Chris Ryland Constantina S. Patrick Sabin @@ -18,6 +18,10 @@ Core and Builtins Library ------- +- Issue #23539: If body is None, http.client.HTTPConnection.request now sets + Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors from + some web servers. + - Issue #22351: The nntplib.NNTP constructor no longer leaves the connection and socket open until the garbage collector cleans them up. Patch by Martin Panter. |