Expected behavior
The HttpPostRequestEncoder preserves the original filename of file uploads sharing the same name encoded in mixed mode.
Actual behavior
The HttpPostRequestEncoder overwrites the original filename of file uploads sharing the same name encoded in mixed mode when it rewrites the multipart body header of the previous file.
Steps to reproduce
Use an HttpPostRequestEncoder with multipart and the default mode and add several body file upload using the same name and different filenames. The test suite contains already such test but the test is wrong and will not check correctly that the original filename is preserved.
Minimal yet complete reproducer code (or URL to code)
Update HttpPostRequestEncoderTest#testMultiFileUploadInMixedMode and change the first occurence of filename="file-02.txt"" by filename="file-01.txt""
Netty version
All ?
JVM version (e.g. java -version)
N/A
OS version (e.g. uname -a)
N/A
Expected behavior
The
HttpPostRequestEncoderpreserves the original filename of file uploads sharing the same name encoded in mixed mode.Actual behavior
The
HttpPostRequestEncoderoverwrites the original filename of file uploads sharing the same name encoded in mixed mode when it rewrites the multipart body header of the previous file.Steps to reproduce
Use an
HttpPostRequestEncoderwith multipart and the default mode and add several body file upload using the same name and different filenames. The test suite contains already such test but the test is wrong and will not check correctly that the original filename is preserved.Minimal yet complete reproducer code (or URL to code)
Update
HttpPostRequestEncoderTest#testMultiFileUploadInMixedModeand change the first occurence of filename="file-02.txt"" by filename="file-01.txt""Netty version
All ?
JVM version (e.g.
java -version)N/A
OS version (e.g.
uname -a)N/A