arturobernalg opened a new pull request, #486: URL: https://github.com/apache/commons-fileupload/pull/486
RFC 2046, section 5.1.1 allows a delimiter to be followed by transport padding (SP and HTAB) and requires a receiver to be able to handle it. `MultipartStream.readBoundary()` only accepted a delimiter directly followed by CRLF or "--". Padding after the first delimiter made the body look as if it had no parts, and padding after any later delimiter caused a `MalformedStreamException`. The padding is now skipped after the delimiter. It is still not accepted before the "--" of the close delimiter, since the RFC only allows it after the complete delimiter. The new tests in `MultipartStreamTest` cover padding after the first, a later and the close delimiter, and padding before the close marker. Two of them fail without the change. `mvn -B -ntp` passes (92 tests, checkstyle). JIRA: https://issues.apache.org/jira/browse/FILEUPLOAD-369 The same code exists in the copy of this class kept in Apache Tomcat, where the maintainers asked for the fix to be made here first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
