Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12097

Combination of path param and query param does not work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.20.1
    • Fix Version/s: 2.20.2, 2.21.0
    • Component/s: camel-restlet
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      If in route are used both path parameter and query parameter:

      restlet:{{data.access.url}}/v2/users/{userId}?projection=full
      

      then because of commit :
      https://github.com/apache/camel/commit/4da8d0ad4472e69a5728f67fa121b3b4150fdc33#diff-470ee30498bbf9ea5b6ea223650c0e1c

      on lines 216-219 are escaped "

      {" "}

      " so userId in my example is never replaced.

      Escaping is done in URISupport.appendParametersToURI on line:

      URI uri = new URI(normalizeUri(originalURI));
      

      There is workaround to use Exchange.HTTP_QUERY header for query parameter and path must not contain query parameters.

        Attachments

          Activity

            People

            • Assignee:
              onders ├ľnder Sezgin
              Reporter:
              cipous Radek Mensik
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: