On Sat, 8 Aug 2026 19:24:30 GMT, Daisuke Yamazaki <[email protected]> wrote:
> Enhances `FileServerHandler` in the jdk.httpserver module to support the > `Range` header. > > This change contains: > 1. A new constant `HTTP_RANGE_NOT_SATISFIABLE` to the `Code` to indicate > unsatisifiable ranges. > 2. `Accept-Ranges: bytes` for all file retrievals. > 3. Single `bytes` ranges, returning `206 Partial Content` with > `Content-Range`. > 4. Multiple `bytes` ranges with `multipart/byteranges`. > 5. Sorting and merging of overlapping or adjacent ranges. > > As discussed in #28021, `If-Range` support is left out of scope for this > change. > However, as required by [RFC > 9110](https://www.rfc-editor.org/rfc/rfc9110.html#section-13.1.5-8), when > `If-Range` is present, the `Range` header is ignored and the full content is > returned. > > `Range` parsing is tested in `FileServerHandlerTest`, > while `SimpleFileServerTest` tests the externally observable HTTP behavior. > > This is a rework of #28021. > The earlier PR contains the previous review discussion and feedback that > informed this version. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Hello @dfuch, Would you be willing to take a look at this PR when you have a chance? This adds HTTP Range request support to the Simple Web Server. It's a rework of #28021, incorporating feedback from the previous review. I'd appreciate your feedback. Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/32266#issuecomment-6410501098
