diff options
author | pjenvey <devnull@localhost> | 2006-10-20 21:44:50 +0000 |
---|---|---|
committer | pjenvey <devnull@localhost> | 2006-10-20 21:44:50 +0000 |
commit | 483f834e298aa5ad2dd098d24e3646667b0fd6f7 (patch) | |
tree | e0ca8d3f275327278131869bd18e578a437d96dd /paste/request.py | |
parent | ddc05eed53f1d3ec8cadf267a0b7a88266aa295b (diff) | |
download | paste-483f834e298aa5ad2dd098d24e3646667b0fd6f7.tar.gz |
changes to QUERY_STRING shouldn't trigger reparsing of formvars:
no longer caching QUERY_STRING vars together with parsed_formvars
(parse_querystring caches them anyway) nor using QUERY_STRING
information as cache keys
Diffstat (limited to 'paste/request.py')
-rw-r--r-- | paste/request.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/paste/request.py b/paste/request.py index 5c5898d..dc3f20a 100644 --- a/paste/request.py +++ b/paste/request.py @@ -136,12 +136,12 @@ def parse_formvars(environ, include_get_vars=True): If the request was not a normal form request (e.g., a POST with an XML body) then ``environ['wsgi.input']`` won't be read. """ - source = (environ.get('QUERY_STRING', ''), - environ['wsgi.input'], - include_get_vars) + source = environ['wsgi.input'] if 'paste.parsed_formvars' in environ: parsed, check_source = environ['paste.parsed_formvars'] if check_source == source: + if include_get_vars: + parsed.update(parse_querystring(environ)) return parsed # @@: Shouldn't bother FieldStorage parsing during GET/HEAD and # fake_out_cgi requests @@ -177,9 +177,9 @@ def parse_formvars(environ, include_get_vars=True): if not value.filename: value = value.value formvars.add(name, value) + environ['paste.parsed_formvars'] = (formvars, source) if include_get_vars: formvars.update(parse_querystring(environ)) - environ['paste.parsed_formvars'] = (formvars, source) return formvars def construct_url(environ, with_query_string=True, with_path_info=True, |