Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-3948

Save pathParamValues encoded and perform decoding when requested

XMLWordPrintable

      Fixes #35960

      As commented in original issue https://github.com/quarkusio/quarkus/issues/34586 the initial problem was that path params are first decoded (`%2F` chars are decoded int `/`) and then splitted by `/`. That should be done in the reverse order to maintain the correct paths. This PR saves the path params in the context encoded instead of decoded. Then they are decoded when needed. For example in the `PathParamExtractor` they are decoded after being splitted as required for triggering issue. Added a little test for the new issue #35960. I think all the CI is passing in my branch.

      I have changed the signature of public methods `getPathParam` and `getResourceLocatorPathParam`, adding the `encoded` parameter. If you want to maintain the previous variant just let me know. I can add them without issues.

      @geoand FYI.

            Unassigned Unassigned
            olubyans@redhat.com Alexey Loubyansky
            Martin Ocenas Martin Ocenas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: