com.sun.net.httpserver.HttpContext that does not end with '/' has surprising matches

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 14
    • Affects Version/s: 6
    • Component/s: core-libs
    • b06

      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.

            Assignee:
            Michael McMahon
            Reporter:
            Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: