reta commented on code in PR #1674:
URL: https://github.com/apache/cxf/pull/1674#discussion_r1479029957


##########
core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java:
##########
@@ -327,7 +327,7 @@ public void writeAttachments() throws IOException {
         StringWriter writer = new StringWriter();
         writer.write("\r\n--");
         writer.write(bodyBoundary);
-        writer.write("--");
+        writer.write("--\r\n");

Review Comment:
   @gchauvet this is not correct as per rfc1341 (see please 
https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html):
   
   ```
   Overall, the body of a multipart entity may be specified as follows:
   multipart-body := preamble 1*encapsulation 
                  close-delimiter epilogue 
   
   encapsulation := delimiter CRLF body-part 
   
   delimiter := CRLF "--" boundary   ; taken from  Content-Type 
   field. 
                                  ;   when   content-type    is 
   multipart 
                                ; There must be no space 
                                ; between "--" and boundary. 
   
   close-delimiter := delimiter "--" ; Again, no  space  before 
   "--" 
   
   preamble :=  *text                  ;  to  be  ignored  upon 
   receipt. 
   
   epilogue :=  *text                  ;  to  be  ignored  upon 
   receipt. 
   
   body-part = <"message" as defined in RFC 822, 
            with all header fields optional, and with the 
            specified delimiter not occurring anywhere in 
            the message body, either on a line by itself 
            or as a substring anywhere.  Note that the 
            semantics of a part differ from the semantics 
            of a message, as described in the text.>
   ```
   
   
   The element in question is 
   ```
   close-delimiter := delimiter "--" ; Again, no  space  before 
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to