-
Bug
-
Resolution: Done
-
Critical
-
4.4.2.Final
-
None
We have found a regression going from Resteasy 3.x to 4.x when consuming multipart form data and base64 (Content-)Transfer-Encoding.
MultipartInputImpl#parse(InputStream is) hands the stream to Mime4JWorkaround.parseMessage(InputStream is) which internally uses Mime4jWorkaroundBinaryEntityBuilder as its content handler. This builder class, when handling the body, with 4.x Versions contains commented out code that, in 3.x versions, did handle the Base64 content decoding. Further commentary in this method hints on MimeStreamParser#setContentDecoding(boolean b) method that should be used instead:
NO NEED TO MANUALLY RUN DECODING. The parser has a "setContentDecoding" method. We should simply instantiate the MimeStreamParser with that method.
However, the calling class Mime4JWorkaround, that should handle this case, sets hardcoded false value for content decoding.
parser.setContentDecoding(false);
This leads to content decoding no longer being applied at all.
As for the moment there does not seem to be any workaround and we had to downgrade back to 3.x, I dared to set this issue as critical.
- relates to
-
RESTEASY-3341 The RESTEasy multipart provider changed the default entity response from binary to base64
- Resolved
-
JBEAP-24949 [GSS](7.4.z) RESTEASY-3341 - The RESTEasy multipart provider changed the default entity response from binary to base64
- Closed