Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-168

URLs with a path containing /http:// are incorrectly parsed by HttpRequestParser

    Details

    • Steps to Reproduce:
      Hide

      I have a servlet that is configured in web.xml to map to URLs of the form:

      http://server/a/b/*

      If I browse to:

      http://server/a/b/http://abc.com/what/ever

      I always get a 404 - Not Found.

      (where a is my war and b is my servlet)

      Show
      I have a servlet that is configured in web.xml to map to URLs of the form: http://server/a/b/* If I browse to: http://server/a/b/http://abc.com/what/ever I always get a 404 - Not Found. (where a is my war and b is my servlet)

      Description

      URLs like these:

      https://server/a/b/http://abc.com/some/thing

      are not routed to the correct servlet (I think, due to HttpRequestParser.handlePath()).

      As far as I can decipher RFC 3986, URLs like these appear to be valid syntax (because ":" and "." are valid in a path segment), and they did work pre-WildFly.

      I have run WildFly in the debugger and traced this through to HttpRequestParser.handlePath(). For the example above, it sets the HttpServerExchange's relativePath to just:

      /some/thing

      instead of the expected full path:

      /a/b/http://abc.com/some/thing

      And consequently the request never gets routed to my servlet.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                darrenjones Darren Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: