This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.2.9!

Range Requests

Spring MVC supports RFC 9110 range requests. For an overview, see the Ranger Requests Mozilla guide.

The Range header is parsed and handled transparently in Spring MVC when an annotated controller returns a Resource or ResponseEntity<Resource>, or a functional endpoint serves a Resource. Range header support is also transparently handled when serving static resources.

The underlying support is in the HttpRange class, which exposes methods to parse Range headers and split a Resource into a List<ResourceRegion> that in turn can be then written to the response via ResourceRegionHttpMessageConverter.