Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request body is ignored on HTTP PUT requests to HTTPServer #41

Closed
joerussbowman opened this issue Dec 10, 2009 · 2 comments
Closed

Request body is ignored on HTTP PUT requests to HTTPServer #41

joerussbowman opened this issue Dec 10, 2009 · 2 comments

Comments

@joerussbowman
Copy link
Contributor

The user marc in the group encountered this, and the patch was supplied in their post here: http://groups.google.com/group/python-tornado/browse_thread/thread/29ec5a1300c10e2/1c7c8239cad08def?lnk=gst&q=put+method#1c7c8239cad08def

diff --git a/tornado/httpserver.py b/tornado/httpserver.py
index 460f5c8..60957c7 100644
--- a/tornado/httpserver.py
+++ b/tornado/httpserver.py
@@ -201,7 +201,7 @@ class HTTPConnection(object):
def _on_request_body(self, data):
self._request.body = data
content_type = self._request.headers.get("Content-Type", "")

  •    if self._request.method == "POST":
    
  •    if self._request.method in ("POST", "PUT"):
         if content_type.startswith("application/x-www-form-
    
    urlencoded"):
    arguments = cgi.parse_qs(self._request.body)
    for name, values in arguments.iteritems():
@funtoo
Copy link

funtoo commented May 13, 2010

Can we get a comment from the Tornado developers on this bug? Thanks.

@bdarnell
Copy link
Member

bdarnell commented Aug 4, 2010

This has been fixed.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants