You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2017/10/16 03:24:22 UTC
[cxf] branch master updated: [CXF-7530]AttachmentSerializer miss a
CRLF before the multipart-body per spec rfc2046
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new de14153 [CXF-7530]AttachmentSerializer miss a CRLF before the multipart-body per spec rfc2046
de14153 is described below
commit de14153b20f4018d5ff48a5f8d95e31aab93417f
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon Oct 16 11:23:58 2017 +0800
[CXF-7530]AttachmentSerializer miss a CRLF before the multipart-body per spec rfc2046
---
core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java | 1 +
.../java/org/apache/cxf/ws/rm/persistence/PersistenceUtilsTest.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
index 8bc20a3..9a4cb0e 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
+++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
@@ -157,6 +157,7 @@ public class AttachmentSerializer {
encoding = StandardCharsets.UTF_8.name();
}
StringWriter writer = new StringWriter();
+ writer.write("\r\n");
writer.write("--");
writer.write(bodyBoundary);
diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/PersistenceUtilsTest.java b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/PersistenceUtilsTest.java
index fbead30..0cd1d32 100644
--- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/PersistenceUtilsTest.java
+++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/PersistenceUtilsTest.java
@@ -96,7 +96,7 @@ public class PersistenceUtilsTest extends Assert {
// update rmmessage
PersistenceUtils.encodeRMContent(rmmsg, messageImpl, bis);
- assertStartsWith(rmmsg.getContent().getInputStream(), "--uuid:");
+ assertStartsWith(rmmsg.getContent().getInputStream(), "\r\n--uuid:");
assertNotNull(rmmsg.getContentType());
assertTrue(rmmsg.getContentType().startsWith("multipart/related"));
}
--
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].