fixed env['QUERY_STRING'], thanks Anthony

This commit is contained in:
mdipierro
2013-08-22 02:19:34 -05:00
parent 93b9b4dfbe
commit 7936ab8ef9
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.21.17.26.48
Version 2.6.0-development+timestamp.2013.08.22.02.18.31
+3
View File
@@ -196,8 +196,11 @@ class Request(Storage):
if (body and
env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH') and
not is_json):
query_string = env.pop('QUERY_STRING') if 'QUERY_STRING' in env else None
dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
post_vars.update(dpost)
if query_string is not None:
env['QUERY_STRING'] = query_string
# The same detection used by FieldStorage to detect multipart POSTs
is_multipart = dpost.type[:10] == 'multipart/'
body.seek(0)