1.1 --- a/XSLForms/Resources/WebResources.py Sun Nov 16 01:19:33 2008 +0100
1.2 +++ b/XSLForms/Resources/WebResources.py Mon Nov 17 01:50:18 2008 +0100
1.3 @@ -122,7 +122,7 @@
1.4 for name, values in parameters.items():
1.5 new_values = []
1.6 for value in values:
1.7 - if value.endswith("\x00"):
1.8 + if isinstance(value, (str, unicode)) and value.endswith("\x00"):
1.9 new_values.append(value[:-1])
1.10 else:
1.11 new_values.append(value)
1.12 @@ -302,7 +302,8 @@
1.13 parameters = trans.get_fields_from_path()
1.14 form.set_parameters(parameters)
1.15
1.16 - elif method == "POST" and content_type.media_type == "application/x-www-form-urlencoded":
1.17 + elif method == "POST" and content_type.media_type in (
1.18 + "application/x-www-form-urlencoded", "multipart/form-data"):
1.19
1.20 # Get the fields from the request body.
1.21