Skip to content

Invalid partial content requests possible with start byte = resource-byte-count #23576

Closed
@gbrehmer

Description

@gbrehmer

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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions