Non-URL encoded Content-Id href does not seem be serialized by CXF's AttachmentSerializer
@@ -24,7 +24,6 @@ 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;
@@ -215,7 +214,7 @@ public class AttachmentSerializer {
if (attachmentId != null) {
attachmentId = checkAngleBrackets(attachmentId);
writer.write("Content-ID: <");
- writer.write(URLDecoder.decode(attachmentId, StandardCharsets.UTF_8.name()));
+ writer.write(attachmentId);
writer.write(">\r\n");
}
// headers like Content-Disposition need to be serialized
