diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-01-18 00:08:45 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-01-18 00:08:45 (GMT) |
commit | 458ad47a2c8045080a86eaaf33bb6cd174021891 (patch) | |
tree | 93868616d9cfc6ac2336042f2cec9b524f9c31cc /Lib | |
parent | 822b21c43b137137bc84774ae47d118a4628b6b3 (diff) | |
download | cpython-458ad47a2c8045080a86eaaf33bb6cd174021891.zip cpython-458ad47a2c8045080a86eaaf33bb6cd174021891.tar.gz cpython-458ad47a2c8045080a86eaaf33bb6cd174021891.tar.bz2 |
Merged revisions 68459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68459 | kristjan.jonsson | 2009-01-09 14:27:16 -0600 (Fri, 09 Jan 2009) | 1 line
Issue 4336: Let users of HTTPConnection.endheaders() submit a message body to the function if required.
........
Diffstat (limited to 'Lib')
-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 19fb959..5930f49 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -1024,9 +1024,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 |