diff options
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r-- | Lib/logging/handlers.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 0d347fb..9668ebe 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -1027,9 +1027,7 @@ class HTTPHandler(logging.Handler): h.putheader("Content-type", "application/x-www-form-urlencoded") h.putheader("Content-length", str(len(data))) - h.endheaders() - if self.method == "POST": - h.send(data) + h.endheaders(data if self.method == "POST" else None) h.getreply() #can't do anything with the result except (KeyboardInterrupt, SystemExit): raise |