RFR: 8272758: Improve HttpServer to avoid partial file name matches while mapping request path to context path [v2]

Volkan Yazici vyazici at openjdk.org
Mon Feb 2 20:24:13 UTC 2026


On Thu, 29 Jan 2026 14:53:25 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add property to switch between prefix matching schemes
>
> test/jdk/com/sun/net/httpserver/ContextPathMatcherPathPrefixTest.java line 52:
> 
>> 50: 
>> 51: /*
>> 52:  * @test id=withProperty
> 
> Suggestion:
> 
>  * @test id=withPathPrefix

I think `withPathPrefix` is misleading, since `id=default` test is also using path-prefix matching. Note that this file only tests path-prefix matching using all possible configuration combinations:

1. Using defaults (`id=default`)
2. Providing a property (`id=withProperty`)
3. Providing an invalid value in the property, and hence, observing the fallback to the default (`id=withInvalidProperty`)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29264#discussion_r2756014602


More information about the net-dev mailing list