1.1 --- a/WebStack/ModPython.py Fri Aug 27 23:53:03 2004 +0000
1.2 +++ b/WebStack/ModPython.py Sat Aug 28 16:51:53 2004 +0000
1.3 @@ -5,6 +5,7 @@
1.4 """
1.5
1.6 import Generic
1.7 +from Helpers.Request import get_body_field
1.8 from Helpers.Response import ConvertingStream
1.9 from mod_python.util import parse_qs, FieldStorage
1.10 from mod_python import apache
1.11 @@ -163,8 +164,7 @@
1.12 Returns a dictionary mapping field names to lists of values (even if a
1.13 single value is associated with any given field name). Each value is
1.14 either a Unicode object (representing a simple form field, for example)
1.15 - or a file-like object (representing a file upload form field, for
1.16 - example).
1.17 + or a plain string (representing a file upload form field, for example).
1.18
1.19 The mod_python.util.FieldStorage class may augment the fields from the
1.20 body with fields found in the path.
1.21 @@ -181,10 +181,7 @@
1.22 for field in self.storage_body.list:
1.23 if not fields.has_key(field.name):
1.24 fields[field.name] = []
1.25 - if hasattr(field.value, "file"):
1.26 - fields[field.name].append(field.value.file)
1.27 - else:
1.28 - fields[field.name].append(unicode(field.value, encoding))
1.29 + fields[field.name].append(get_body_field(field.value, encoding))
1.30 return fields
1.31
1.32 def get_user(self):