Search code examples
pythontornado

Tornado GET request query vs query_arguments


I am seeing a format difference between my tornado GET request handler query and query_arguments methods.

request.query = "InstID=IRSwap/wN1G7RLwkUFP+LdocRpxPW&EndDate=10Y'

request.query_arguments = {'InstID': ['IRSwap/wN1G7RLwkUFP LdocRpxPW'], 'EndDate': ['10Y']}

Why does the InstID value drop the '+' in favor of ' '? Is there a way I can force query_arguments to return a consistent format to the query string (return string with + value in it). Thanks!


Solution

  • Nothing is being dropped. The + is being treated as a space. See this question which discusses this issue - URLs and plus signs.