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)