-
Bug
-
Resolution: Done
-
Major
-
2.0.30.Final, 2.1.1.Final
-
None
Undertow currently returns "206 Partial Content" with the "Content-Length: 0" when first-byte-pos of the Range request header is equal to the size of the content.
However, RFC 7233 (https://tools.ietf.org/html/rfc7233#section-2.1) states:
2.1. Byte Ranges
...(snip)...If a valid byte-range-set includes at least one byte-range-spec with a first-byte-pos that is less than the current length of the representation,
or at least one suffix-byte-range-spec with a non-zero suffix-length, then the byte-range-set is satisfiable.
Otherwise, the byte-range-set is unsatisfiable.
So, "416 Range Not Satisfiable" should be returned in this case.
—
As a side note, if you use older Undertow than the version that contains the fix for UNDERTOW-1595, the same NullPointerException as UNDERTOW-1595 happens in this case, too.
- is cloned by
-
JBEAP-19566 [GSS](7.2.z) UNDERTOW-1717 - Return 416 Range Not Satisfiable when first-byte-pos of Range request header is equal to the content-length
- Closed
-
JBEAP-19567 [GSS](7.3.z) UNDERTOW-1717 - Return 416 Range Not Satisfiable when first-byte-pos of Range request header is equal to the content-length
- Closed
- relates to
-
UNDERTOW-1595 NullPointerException can happen on a range request for a static content
- Resolved