From a8c7220fc7f318e9e12f660442b9d41daaad09c9 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 11 Nov 2015 18:04:28 -0500 Subject: [PATCH] Fix failing tests --- .../annotation/RequestResponseBodyMethodProcessorTests.java | 2 +- .../ServletAnnotationControllerHandlerMethodTests.java | 2 +- src/asciidoc/index.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java index 8d309154b7..8d9f373e18 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java @@ -425,7 +425,7 @@ public class RequestResponseBodyMethodProcessorTests { String header = servletResponse.getHeader("Content-Disposition"); if (expectContentDisposition) { assertEquals("Expected 'Content-Disposition' header. Use case: '" + comment + "'", - "attachment;filename=f.txt", header); + "inline;filename=f.txt", header); } else { assertNull("Did not expect 'Content-Disposition' header. Use case: '" + comment + "'", header); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index bb0763ab4e..fcdd0cdddf 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -1631,7 +1631,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl assertEquals(200, response.getStatus()); 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()); } diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 6c27556cf5..24e9e40cdb 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -30694,7 +30694,7 @@ nor disabling the use of path extensions for content negotiation purposes alone are effective at preventing RFD attacks. 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 path contains a file extension that is neither whitelisted nor explicitly registered for content negotiation purposes. However it may potentially have