Przeglądaj źródła

Fix environ var parsing.

pull/24/head
Ben Kurtovic 10 lat temu
rodzic
commit
c346161eed
2 zmienionych plików z 2 dodań i 2 usunięć
  1. +1
    -1
      copyvios/misc.py
  2. +1
    -1
      pages/debug.mako

+ 1
- 1
copyvios/misc.py Wyświetl plik

@@ -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 Wyświetl plik

@@ -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>


Ładowanie…
Anuluj
Zapisz