diff options
author | ianb <devnull@localhost> | 2006-11-26 20:29:23 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2006-11-26 20:29:23 +0000 |
commit | e3585e39324bfb39d1a3ca80e5cb9c743d36b1ab (patch) | |
tree | fa51bde2fdec26bebf7ad1b1745e18b85205f4d9 /paste/request.py | |
parent | 56d76f6c36cfa84e695c6abbf1fcc0e827e31cbb (diff) | |
download | paste-e3585e39324bfb39d1a3ca80e5cb9c743d36b1ab.tar.gz |
Use a default CONTENT_LENGTH of 0
Diffstat (limited to 'paste/request.py')
-rw-r--r-- | paste/request.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/paste/request.py b/paste/request.py index 06612e0..b710cea 100644 --- a/paste/request.py +++ b/paste/request.py @@ -152,6 +152,9 @@ def parse_formvars(environ, include_get_vars=True): type = type.split(';', 1)[0] fake_out_cgi = (type not in ('', 'application/x-www-form-urlencoded') and not type.startswith('multipart/form-data')) + # FieldStorage assumes a default CONTENT_LENGTH of -1, but a + # default of 0 is better: + environ.setdefault('CONTENT_LENGTH', '0') # Prevent FieldStorage from parsing QUERY_STRING during GET/HEAD # requests old_query_string = environ.get('QUERY_STRING','') |