eclipse-ee4j / metro-saaj

https://eclipse-ee4j.github.io/metro-saaj/
Other
13 stars 16 forks source link

Newline in ParameterList.toString() #176

Closed svettwer closed 1 year ago

svettwer commented 3 years ago

Hello everybody :wave:

We're currently running into a problem where long header values contain new lines which, from my understanding, breaks rfc7230.

Historically, HTTP header field values could be extended over
multiple lines by preceding each extra line with at least one space
or horizontal tab (obs-fold).  This specification deprecates such
line folding except within the message/http media type
(Section 8.3.1).  A sender MUST NOT generate a message that includes
line folding (i.e., that has any field-value that contains a match to
he obs-fold rule) unless the message is intended for packaging
within the message/http media type. 

We debugged the code and found that the newline is added in the following section of the code.

https://github.com/eclipse-ee4j/metro-saaj/blob/5cee79271b3494112c4168eb7b86967d30ef1c0d/saaj-ri/src/main/java/com/sun/xml/messaging/saaj/packaging/mime/internet/ParameterList.java#L189-L192

which is called from here: https://github.com/eclipse-ee4j/metro-saaj/blob/5cee79271b3494112c4168eb7b86967d30ef1c0d/saaj-ri/src/main/java/com/sun/xml/messaging/saaj/soap/MessageImpl.java#L910

If you would agree that this is something to change, I'll ask my team if it would be okay to propose a fix for that.

Thx a lot!

BR Sven