You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2010/01/19 17:00:54 UTC

[jira] Assigned: (CXF-2623) AttachmentDeserializer doesn't work when no boundary message in content type

     [ https://issues.apache.org/jira/browse/CXF-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-2623:
--------------------------------

    Assignee: Daniel Kulp

> AttachmentDeserializer doesn't work when no boundary message in content type
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2623
>                 URL: https://issues.apache.org/jira/browse/CXF-2623
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5
>            Reporter: Ricky Hazelwood
>            Assignee: Daniel Kulp
>            Priority: Blocker
>
> Changes done to AttachmentDeserializer.INPUT_STREAM_BOUNDARY_PATTERN (in http://svn.apache.org/viewvc?view=revision&revision=766101) has caused the message without boundary descriptor in content type to fail. The regex is missing the MULTILINE flag.
> Here is a quick test :
> {code:java}
>         String message = "Address: /inbox\n" +
>                          "Encoding: ISO-8859-1\n" +
>                          "Content-Type: multipart/related\n" +
>                          "Headers: {content-type=[multipart/related], connection=[Keep-Alive], Authorization=[Basic dmVyb0FkbWluOmNoYW5nZW1l], " +
>                          "host=[203.0.194.58:443], Content-Length=[16569], SOAPAction=[http://www.ACORD.org/Standards/AcordMsgSvc/Inbox#PostRq], " +
>                          "keep-alive=[timeout=5, max=10000], Content-Type=[multipart/related]}\n" +
>                          "Payload:\n" +
>                          "------=_Part_34950_1098328613.1263781527359\n" +
>                          "Content-Type: text/xml; charset=UTF-8\n" +
>                          "Content-Transfer-Encoding: binary\n" +
>                          "Content-Id: <31...@auhpap02>\n" +
>                          "\n" +
>                          "<envelope/>\n" +
>                          "------=_Part_34950_1098328613.1263781527359\n" +
>                          "Content-Type: text/xml\n" +
>                          "Content-Transfer-Encoding: binary\n" +
>                          "Content-Id: <b86a5f2d-e7af-4e5e-b71a-9f6f2307cab0>\n" +
>                          "Content-Length: 13129\n" +
>                          "\n" +
>                          "<message>\n" +
>                          "------=_Part_34950_1098328613.1263781527359--";
>         Matcher m = Pattern.compile("^--(\\S*)").matcher(message);
>         Assert.assertFalse(m.find());
>         m = Pattern.compile("^--(\\S*)", Pattern.MULTILINE).matcher(message);
>         Assert.assertTrue(m.find());
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.