Author: ianb
Date: 2005-03-31 09:43:12 -0700 (Thu, 31 Mar 2005)
New Revision: 2269
Modified:
WSGIKit/trunk/wsgikit/webkit/wkrequest.py
Log:
* Make GET parameters to a POST request partially flattened, like they
are during a GET request (reported by Eric Radman)
Modified: WSGIKit/trunk/wsgikit/webkit/wkrequest.py
===================================================================
--- WSGIKit/trunk/wsgikit/webkit/wkrequest.py 2005-03-31 14:57:18 UTC (rev 2268)
+++ WSGIKit/trunk/wsgikit/webkit/wkrequest.py 2005-03-31 16:43:12 UTC (rev 2269)
@@ -63,6 +63,11 @@
strict_parsing=False)
for name, value in self._getFields.items():
if not dict.has_key(name):
+ if isinstance(value, list) and len(list) == 1:
+ # parse_qs always returns a list of lists,
+ # while FieldStorage only uses lists for
+ # keys that actually repeat; this fixes that.
+ value = value[0]
dict[name] = value
self._fields = dict
|