Kaydet (Commit) 458ad47a authored tarafından Benjamin Peterson's avatar Benjamin Peterson

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.
........
üst 822b21c4
...@@ -1024,9 +1024,7 @@ class HTTPHandler(logging.Handler): ...@@ -1024,9 +1024,7 @@ class HTTPHandler(logging.Handler):
h.putheader("Content-type", h.putheader("Content-type",
"application/x-www-form-urlencoded") "application/x-www-form-urlencoded")
h.putheader("Content-length", str(len(data))) h.putheader("Content-length", str(len(data)))
h.endheaders() h.endheaders(data if self.method == "POST" else None)
if self.method == "POST":
h.send(data)
h.getreply() #can't do anything with the result h.getreply() #can't do anything with the result
except (KeyboardInterrupt, SystemExit): except (KeyboardInterrupt, SystemExit):
raise raise
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment