It is possible to create a com.sun.net.httpserver.HttpContext whose path parameter does not end with '/'. Eg. "/context". In this case, requests whose path looks like "/contextfoo" or "/contextbar" will match, which is probably not expected.
Nevertheless, this is how it is specified to behave and rather than changing both spec and implementation, it may be simpler to clarify the docs such that the path needs to end with a '/' character.
Nevertheless, this is how it is specified to behave and rather than changing both spec and implementation, it may be simpler to clarify the docs such that the path needs to end with a '/' character.
- csr for
-
JDK-8227259 com.sun.net.httpserver.HttpContext that does not end with '/' has surprising matches
-
- Closed
-