Details
Description
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 :
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: <318731183421.1263781527359.IBM.WEBSERVICES@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());