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

AjpRequestParser doesn't include path parameters in HttpServerExchange requestURI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.4.Final, 1.2.0.CR1
    • 1.1.0.Final
    • AJP
    • None

    Description

      When reading request URI from AJP request containing path parameters AjpRequestParser set the URI in HttpServerExchange until the colon (from line 237 in parse method)

      int colon = result.value.indexOf(';');
      if (colon == -1) {
              String res = decode(result.value, result.containsUrlCharacters);
              exchange.setRequestURI(result.value);
              exchange.setRequestPath(res);
              exchange.setRelativePath(res);
      } else {
              final String url = result.value.substring(0, colon);
              String res = decode(url, result.containsUrlCharacters);
              exchange.setRequestURI(url);
              exchange.setRequestPath(res);
              exchange.setRelativePath(res);
              URLUtils.parsePathParms(result.value.substring(colon + 1), exchange, encoding, doDecode && result.containsUrlCharacters);
      }
      

      This is different from HttpRequestParser behavior (line 560 in handlePathParameters method)

      exchange.setRequestURI(exchange.getRequestURI() + ';' + stringBuilder.toString(), state.parseState > HOST_DONE);
      

      IN this way it's not possible way to retrieve path parameters from HttpRequest, so that, e.g., RestEasy is not able to set MatrixParam annotated method parameters.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            dgaffuri Daniele Gaffuri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: