Join GitHub today
Preserve the original filename when encoding a multipart/form in mixe… #9270
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. The original filename should be preserved instead.
Change the HttpPostRequestEncoder to reuse the correct filename when the encoder switches to mixed mode. The original test is incorrect and has been modified too, in addition it tests with an extra file upload since the current test was not testing the continuation of a mixed mode.
The HttpPostRequestEncoder will preserve the original filename of the first fileupload when switching to mixed mode