reiern70 opened a new issue, #1676: URL: https://github.com/apache/wicket/issues/1676
`AbstractResource.setRequestRangeMetaData()` understands only the `<first>-<last>` form of a byte range, so the other forms RFC 9110 defines come out wrong. Requesting `PackageResourceReferenceTest`'s 25-byte `resource.txt` (content `resource_var_style_en.txt`) on master: | `Range` | served | RFC 9110 | |---|---|---| | `bytes=-5` | `resour` (bytes 0–5) | the last 5 bytes, `n.txt` (§14.1.2, suffix range) | | `bytes=20-10` | `n.txt` (byte 20 to the end) | invalid, last-pos < first-pos (§14.1.1): ignore or reject | | `bytes=30-` | empty body | unsatisfiable: `416` with `Content-Range: bytes */25` (§15.5.17) | `setResponseContentRangeHeaderFields()` also writes the requested last byte as given, so `bytes=0-99` on the same resource is answered with `Content-Range: bytes 0-99/25`, while §14.4 requires last-pos to be less than the complete length (`bytes 0-24/25`). The existing `testContentRange` doesn't catch the suffix case because it uses `bytes=-25`, the full length of its resource, where "the first 26 bytes" and "the last 25 bytes" are the same thing. Related: #1672 handles headers that cannot be parsed at all and does not change any of the above. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
