RFR: 8355572: Support HTTP Range requests in Simple Web Server [v3]

Florent Guillaume duke at openjdk.org
Thu Oct 30 11:45:35 UTC 2025


On Thu, 30 Oct 2025 11:19:59 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Peyang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove ETag handling from response headers and related tests
>
> src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java line 315:
> 
>> 313:     }
>> 314: 
>> 315:     private List<RangeEntry> parseRangeHeader(String rangeHeader, long fileSize) {
> 
> It would be good to add a comment block before this method (no need for javadoc-style, // is enough) to give an example of all the valid values for the `rangeHeader` string. That would help in asserting that the method body does what it is supposed to do, and it will make easier to maintain should a bug be discovered later on.

Not a reviewer, but I'd go further: this kind of method should be directly unit tested (not indirectly through all the http layers), and full coverage ensured.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28021#discussion_r2477765798


More information about the net-dev mailing list