Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageImpl.setFinalContentType() mangles Content-Type #10

Open
patrick-peer opened this issue Feb 2, 2023 · 0 comments
Open

MessageImpl.setFinalContentType() mangles Content-Type #10

patrick-peer opened this issue Feb 2, 2023 · 0 comments

Comments

@patrick-peer
Copy link

patrick-peer commented Feb 2, 2023

com.sun.xml.messaging.saaj.soap.MessageImpl.setFinalContentType(String) uses com.sun.xml.messaging.saaj.packaging.mime.internet.ContentType.toString() to (re-)set the Content-Type. Quite ironically a comment there states that "SOAP message senders should send Content-Type headers on a single long line.", but the implementation of com.sun.xml.messaging.saaj.packaging.mime.internet.ParameterList.toString(int) introduces "\r\n\t" on overflows.

Example:
I want to deliberately set the string application/soap+xml;action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue";charset=utf-8 as Content-Type, by calling com.synedra.xds.soap.messagebuilder.SoapMessageBuilder.setMimeHeader(String, String). What is actually sent over the wire is

Content-Type: application/soap+xml; charset=utf-8; \r\n
\taction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"\r\n

See also https://stackoverflow.com/questions/48413785/spring-integration-and-soap-1-2-setting-soapaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant