# HG changeset patch # User paulb # Date 1163209396 0 # Node ID a57218cde853bc23f5167c5a042d6c8f7f3c945e # Parent de21e767581bd728d87b973f21b6050e891b3e16 [project @ 2006-11-11 01:43:16 by paulb] Introduced a content type check to avoid needless discarding of non-form data. diff -r de21e767581b -r a57218cde853 XSLForms/Resources/WebResources.py --- a/XSLForms/Resources/WebResources.py Sat Nov 11 01:42:52 2006 +0000 +++ b/XSLForms/Resources/WebResources.py Sat Nov 11 01:43:16 2006 +0000 @@ -180,7 +180,7 @@ given 'stylesheet_filenames', the 'document' upon which the result will be based, the optional parameters as defined in the 'stylesheet_parameters' dictionary, the optional parameters as defined - in the 'stylesheet_parameters' dictionaryand the optional 'references' + in the 'stylesheet_parameters' dictionary and the optional 'references' to external documents. """ @@ -246,6 +246,7 @@ # Only obtain field information according to the stated method. + content_type = trans.get_content_type() method = trans.get_request_method() in_page_resource = self.get_in_page_resource(trans) @@ -261,7 +262,7 @@ parameters = trans.get_fields_from_path() form.set_parameters(parameters) - elif method == "POST": + elif method == "POST" and content_type.media_type == "application/x-www-form-urlencoded": # Get the fields from the request body. # NOTE: The encoding is actually redundant since WebStack produces