Fix failing tests

This commit is contained in:
Rossen Stoyanchev 2015-11-11 18:02:50 -05:00
parent 3a919a48d6
commit e707347474
3 changed files with 3 additions and 3 deletions

View File

@ -644,7 +644,7 @@ public class RequestResponseBodyMethodProcessorTests {
String header = servletResponse.getHeader("Content-Disposition"); String header = servletResponse.getHeader("Content-Disposition");
if (expectContentDisposition) { if (expectContentDisposition) {
assertEquals("Expected 'Content-Disposition' header. Use case: '" + comment + "'", assertEquals("Expected 'Content-Disposition' header. Use case: '" + comment + "'",
"attachment;filename=f.txt", header); "inline;filename=f.txt", header);
} }
else { else {
assertNull("Did not expect 'Content-Disposition' header. Use case: '" + comment + "'", header); assertNull("Did not expect 'Content-Disposition' header. Use case: '" + comment + "'", header);

View File

@ -1655,7 +1655,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
assertEquals(200, response.getStatus()); assertEquals(200, response.getStatus());
assertEquals("text/html", response.getContentType()); assertEquals("text/html", response.getContentType());
assertEquals("attachment;filename=f.txt", response.getHeader("Content-Disposition")); assertEquals("inline;filename=f.txt", response.getHeader("Content-Disposition"));
assertArrayEquals(content, response.getContentAsByteArray()); assertArrayEquals(content, response.getContentAsByteArray());
} }

View File

@ -884,7 +884,7 @@ nor disabling the use of path extensions for content negotiation purposes alone
are effective at preventing RFD attacks. are effective at preventing RFD attacks.
For comprehensive protection against RFD, prior to rendering the response body For comprehensive protection against RFD, prior to rendering the response body
Spring MVC adds a `Content-Disposition:attachment;filename=f.txt` header to Spring MVC adds a `Content-Disposition:inline;filename=f.txt` header to
suggest a fixed and safe download file filename. This is done only if the URL suggest a fixed and safe download file filename. This is done only if the URL
path contains a file extension that is neither whitelisted nor explicitly path contains a file extension that is neither whitelisted nor explicitly
registered for content negotiation purposes. However it may potentially have registered for content negotiation purposes. However it may potentially have