On Sun, 2 Nov 2025 17:04:22 GMT, Florent Guillaume <[email protected]> wrote:

>> Peyang has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   Allow unlimited splits when parsing HTTP Range header to detect trailing 
>> commas
>
> test/jdk/com/sun/net/httpserver/simpleserver/FileServerHandlerTest.java line 
> 147:
> 
>> 145: 
>> 146:                 // malformed numbers or format
>> 147:                 {"bytes=-0"}, {"bytes=meow"}, {"bytes=--500"}, 
>> {"bytes=500"}, {"bytes=-"}, {"bytes=+500-600"},
> 
> Please add a test for `bytes=400--500` which uses a code path not covered by 
> existing tests.
> Also worth adding `bytes=500-+600` and variations with `+` in all possible 
> positions, and omitting left part.
> Add also `bytes=--`, `bytes=-+1`, ... I'm sure one could come up with more.

Thanks for your review.
I've added some of the suggested invalid range patterns to the test.

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

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

Reply via email to