RFR: 8272758: Improve HttpServer to avoid partial file name matches while mapping request path to context path [v7]
Daniel Fuchs
dfuchs at openjdk.org
Wed Feb 18 14:44:45 UTC 2026
On Wed, 18 Feb 2026 14:33:55 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Currently `HttpServer` allows matching a request path `/foobar` to context path `/foo`. Replace this surprising behaviour with a safer approach by requiring exact *path prefix matches*.
>>
>>
>> | Request path
>> Context +------+-------+----------+---------
>> path | /foo | /foo/ | /foo/bar | /foobar
>> ---------+------+-------+----------+---------
>> / | Y | Y | Y | Y
>> /foo/ | N | Y | Y | N
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Clarify the "old behavior"
The latest changes LGTM.
-------------
Marked as reviewed by dfuchs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29264#pullrequestreview-3820292777
More information about the net-dev
mailing list