Opened 12 years ago

Closed 12 years ago

#4143 defect closed fixed (fixed)

twisted.web.wsgi incorrectly unquotes QUERY_STRING

Reported by: therve Owned by:
Priority: normal Milestone: Twisted-10.0
Component: web Keywords:
Cc: Branch: branches/wsgi-query-string-4143
branch-diff, diff-cov, branch-cov, buildbot
Author: therve


In _WSGIResponse.__init__, the data put in the QUERY_STRING env value is passed through urllib.unquote. Although the WSIG spec is unclear about it, it looks like the query string should be passed unchanged, and lets the application deals with it.

Change History (5)

comment:1 Changed 12 years ago by therve

Author: therve
Branch: branches/wsgi-query-string-4143

(In [28255]) Branching to 'wsgi-query-string-4143'

comment:2 Changed 12 years ago by therve

Keywords: review added
Owner: therve deleted

This is ready to review in the attached branch.

comment:3 Changed 12 years ago by spiv

Keywords: review removed
Owner: set to therve

A quick skim of wsgiref suggests you're right that it should be unquoted. In that case, this change looks good to me. So, assuming the rest of the test suite passes, all that is missing is a news file. With a news file this will be good to merge.

comment:4 Changed 12 years ago by therve

Resolution: fixed
Status: newclosed

(In [28295]) Merge wsgi-query-string-4143

Author: therve Reviewer: spiv Fixes: #4143

Remove the call to unquote on QUERY_STRING in twisted.web.wsgi, to pass the string unchanged to the application layer. It seems to be the expected behavior of WSGI containers.

comment:5 Changed 11 years ago by <automation>

Owner: therve deleted
Note: See TracTickets for help on using tickets.