Created attachment 196958[details][diff][review]
patch
- I changed |ParseTypeFromNode()| to return the the actual namespace URI rather
than just the textual prefix. This is more useful, and all of the code that
currently uses this call is doing the conversion from prefix to URI anyway.
- In |nsXFormsSubmissionElement::CopyChildren()|, the code was never going down
the path to add upload the contents of a local file. This is because it was
calling |GetElementEncodingType()| on 'destChild', which is a clone of
'currentNode', but doesn't contain the relevant attributes. Passing
'currentNode' fixed this issue.
- In |nsXFormsSubmissionElement::SerializeDataMultipartRelated()|, we were
never checking the return value for |SerializeDataXML()|. So if that failed,
we would still try to submit, and crash.
- Some of the code incorrectly referenced 'base64binary', when we should be
using 'base64Binary' (noticed capitalized 'B').

Created attachment 197763[details]
tescase
To recreate submission attachment error:
1) Click Browse button and select a file.
2) Click Submit button.
=> This is a multipart-post, so the page that loads should show the instance
data, followed by the file you selected. The path name in the <attachment>
node should be replaced by an ID string, which points to the attached file.
To recreate crash:
1) Click Browse button and select a file.
2) Click Clear.
3) Click Submit.
=> Should fail to submit, since the <attachment> node doesn't validate.
Instead, it tries to submit and crashes.