Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225479

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 6
    • 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.

            michaelm Michael McMahon
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: