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

URLUtils QueryStringParser#parse() should not add a query parameter to HttpServerExchange when parameter name and value are empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.15.Final
    • 2.2.14.Final
    • Core
    • None

      When a client sends a request with some query parameters which is empty key/value unexpectedly like the following:

      http://localhost/example/test.jsp?&foo1=bar1&foo2=bar2
      

      For the above request, ServletRequest#getParameterNames() should return foo1 and foo2.

      However, when the request comes through the AJP protocol, URLUtils' QueryStringParser#parse(), which is called from AjpRequestParser, adds an empty key/value param to HttpServerExchange in addition to foo1 and foo2. So, ServletRequest#getParameterNames() returns the different result.

      It appears that HttpRequestParser ignores such empty key/value query parameter, so it looks like AJP listener specific issue.

              rhn-support-mmiura Masafumi Miura
              rhn-support-mmiura Masafumi Miura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: