Skip to content

Commit e707347

Browse files
committed
Fix failing tests
1 parent 3a919a4 commit e707347

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ private void assertContentDisposition(RequestResponseBodyMethodProcessor process
644644
String header = servletResponse.getHeader("Content-Disposition");
645645
if (expectContentDisposition) {
646646
assertEquals("Expected 'Content-Disposition' header. Use case: '" + comment + "'",
647-
"attachment;filename=f.txt", header);
647+
"inline;filename=f.txt", header);
648648
}
649649
else {
650650
assertNull("Did not expect 'Content-Disposition' header. Use case: '" + comment + "'", header);

spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ public void initialize(GenericWebApplicationContext wac) {
16551655

16561656
assertEquals(200, response.getStatus());
16571657
assertEquals("text/html", response.getContentType());
1658-
assertEquals("attachment;filename=f.txt", response.getHeader("Content-Disposition"));
1658+
assertEquals("inline;filename=f.txt", response.getHeader("Content-Disposition"));
16591659
assertArrayEquals(content, response.getContentAsByteArray());
16601660
}
16611661

src/asciidoc/web-mvc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ nor disabling the use of path extensions for content negotiation purposes alone
884884
are effective at preventing RFD attacks.
885885

886886
For comprehensive protection against RFD, prior to rendering the response body
887-
Spring MVC adds a `Content-Disposition:attachment;filename=f.txt` header to
887+
Spring MVC adds a `Content-Disposition:inline;filename=f.txt` header to
888888
suggest a fixed and safe download file filename. This is done only if the URL
889889
path contains a file extension that is neither whitelisted nor explicitly
890890
registered for content negotiation purposes. However it may potentially have

0 commit comments

Comments
 (0)