#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.
diff --git a/Misc/NEWS b/Misc/NEWS
index 70a882e..111a280 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,10 @@
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 #23136: _strptime now uniformly handles all days in week 0, including
Dec 30 of previous year. Based on patch by Jim Carroll.