summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-09 20:27:16 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-09 20:27:16 (GMT)
commit84040dbe8170864ba673321ec7568974bdabf5a4 (patch)
treefb2b37c85ed17cdc154d05407ec65fd500ab32ea /Lib/logging
parent7e876f5e931b92e6becb08033a8980cb31fb2e8e (diff)
downloadcpython-84040dbe8170864ba673321ec7568974bdabf5a4.zip
cpython-84040dbe8170864ba673321ec7568974bdabf5a4.tar.gz
cpython-84040dbe8170864ba673321ec7568974bdabf5a4.tar.bz2
Issue 4336: Let users of HTTPConnection.endheaders() submit a message body to the function if required.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/handlers.py4
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