Browse Source

Fix environ var parsing.

pull/24/head
Ben Kurtovic 11 years ago
parent
commit
c346161eed
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      copyvios/misc.py
  2. +1
    -1
      pages/debug.mako

+ 1
- 1
copyvios/misc.py View File

@@ -15,7 +15,7 @@ class Query(object):
if method == "GET":
parsed = parse_qs(environ["QUERY_STRING"])
elif method == "POST":
size = environ.get("CONTENT_LENGTH", 0)
size = int(environ.get("CONTENT_LENGTH", 0))
parsed = parse_qs(environ["wsgi.input"].read(size))
else:
parsed = {}


+ 1
- 1
pages/debug.mako View File

@@ -4,7 +4,7 @@
% if key not in ["wsgi.input", "wsgi.errors", "PATH"]:
<li><b>${key}</b>: ${value | h}</li>
% elif key == "wsgi.input":
<li><b>${key}</b>: ${value.read(environ.get("CONTENT_LENGTH", 0)) | h}</li>
<li><b>${key}</b>: ${value.read(int(environ.get("CONTENT_LENGTH", 0))) | h}</li>
% endif
% endfor
</ul>


Loading…
Cancel
Save