Invalid partial content requests possible with start byte = resource-byte-count #23576
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Spring Boot 2.1.7 / Spring Framework 5.1.9
Because ResourceRegion (HttpRange.toResourceRegion) allows regions with a length of 0, it is possible to request the following range.
Range: bytes=<resource_byte_count>-
This will return the following invalid Content-Range Header:
Content-Range: length-(length_minus_1)/length
For example:
Content-Range: 37623133-37623132/37623133
Length: 0 Bytes
Such a request should return 416 like other requests outside of the valid range
The text was updated successfully, but these errors were encountered: