You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by de...@apache.org on 2018/09/28 11:32:56 UTC

[cxf] 01/01: Revert "[CXF-7317] Non-URL encoded Content-Id href does not seem be serialized by CXF's AttachmentSerializer"

This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch revert-408-cid-content-id
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit aab5af38cbd5bd319642c300395e6eb16cb09260
Author: Dennis Kieselhorst <ma...@dekies.de>
AuthorDate: Fri Sep 28 13:32:28 2018 +0200

    Revert "[CXF-7317] Non-URL encoded Content-Id href does not seem be serialized by CXF's AttachmentSerializer"
---
 core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java | 3 ++-
 1 file 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 3a86c40..df94235 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
+++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.StringWriter;
 import java.io.Writer;
+import java.net.URLDecoder;
 import java.nio.charset.StandardCharsets;
 import java.util.Collections;
 import java.util.Iterator;
@@ -214,7 +215,7 @@ public class AttachmentSerializer {
         if (attachmentId != null) {
             attachmentId = checkAngleBrackets(attachmentId);
             writer.write("Content-ID: <");
-            writer.write(attachmentId);
+            writer.write(URLDecoder.decode(attachmentId, StandardCharsets.UTF_8.name()));
             writer.write(">\r\n");
         }
         // headers like Content-Disposition need to be serialized