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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: