You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Abhinav Mehta (Jira)" <ji...@apache.org> on 2020/02/20 09:43:00 UTC

[jira] [Created] (CXF-8218) Cannot remove AttachmentOutInterceptor from out interceptor chain

Abhinav Mehta created CXF-8218:
----------------------------------

             Summary: Cannot remove AttachmentOutInterceptor from out interceptor chain
                 Key: CXF-8218
                 URL: https://issues.apache.org/jira/browse/CXF-8218
             Project: CXF
          Issue Type: Bug
            Reporter: Abhinav Mehta
         Attachments: AttachmentBoundaryInterceptor.java

I have an  application which makes call to a server API and upload file to it. Content type used is multi part form data. By default AttachmentOutInterceptor and AttachmentSerializer add double quotes around the boundary. The server complains that they cannot process due to presence of double quotes around boundary. 

Default CXF behavior : 
Content-Type: multipart/form-data; boundary="uuid:c08c89e5-8d73-41f5-960a-89128bc46213"
(boundary attribute starts and ends with double quotes)

External system expects :
Content-Type: multipart/form-data; boundary=uuid:c08c89e5-8d73-41f5-960a-89128bc46213
(boundary attribute should NOT have starting and ending double quotes)

 

I created a AttachmentBoundaryInterceptor.java  custom interceptor to remove the AttachmentOutInterceptor but unfortunaltey AttachmentOutInterceptor does not appear in out chain. 

setup [PolicyOutInterceptor]
 pre-logical [ClientRequestFilterInterceptor]
 prepare-send [MessageSenderInterceptor]
 pre-stream [PECXFLoggingOutInterceptor]
 write [BodyWriter]
 pre-stream-ending [AttachmentOutEndingInterceptor]
 prepare-send-ending [MessageSenderEndingInterceptor]

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)