mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Add HEAD support in MVC/WebFlux Resource handling
This commit introduces explicit HEAD support in Spring MVC's ResourceHttpRequestHandler and WebFlux's ResourceWebHandler, adding just headers but no body. Closes gh-28291
This commit is contained in:
+2
-1
@@ -118,7 +118,8 @@ public class ResourceHttpRequestHandlerTests {
|
||||
assertThat(this.response.containsHeader("Last-Modified")).isTrue();
|
||||
assertThat(this.response.getDateHeader("Last-Modified") / 1000).isEqualTo(resourceLastModified("test/foo.css") / 1000);
|
||||
assertThat(this.response.getHeader("Accept-Ranges")).isEqualTo("bytes");
|
||||
assertThat(this.response.getHeaders("Accept-Ranges").size()).isEqualTo(1);
|
||||
assertThat(this.response.getHeaders("Accept-Ranges")).hasSize(1);
|
||||
assertThat(this.response.getContentAsByteArray()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user