manually committed pull 221, update vars only if FieldStorage holds actually something, thanks Niphlod

This commit is contained in:
mdipierro
2013-09-21 18:15:27 -05:00
parent 17c10b8a45
commit 5a12a7fb31
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.3-stable+timestamp.2013.09.20.21.27.35
Version 2.6.3-stable+timestamp.2013.09.21.18.14.28
+2 -1
View File
@@ -215,7 +215,8 @@ class Request(Storage):
and env.request_method in ('POST', 'PUT', 'DELETE', 'BOTH')):
query_string = env.pop('QUERY_STRING',None)
dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
post_vars.update(dpost)
if len(dpost):
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