Deprecate setContentDispositionFormData method

The method was orginally added under SPR-14547 but the example in it
was probably intended for use with Content-Disposition server response
header (file download) and not for a Content-Disposition header
within the body of a multipart request.

In a Spring application a multipart request is typically serialized
by the FormHttpMessageConverter and hence the Content-Disposition is
not explicitly set by the application.
This commit is contained in:
Rossen Stoyanchev
2017-07-20 17:58:52 +02:00
parent 0e8bd71d53
commit cd602e5904
2 changed files with 22 additions and 6 deletions

View File

@@ -311,6 +311,7 @@ public class HttpHeadersTests {
assertThat(headers.getCacheControl(), is("max-age=1000, public, s-maxage=1000"));
}
@SuppressWarnings("deprecation")
@Test
public void contentDisposition() {
headers.setContentDispositionFormData("name", null);