Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-8642

rewrite handler handles references to contextual values incorrect

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 10.1.0.Final
    • Fix Version/s: 12.0.0.Beta1, 12.0.0.Final
    • Component/s: Web (Undertow)
    • Labels:
      None
    • Environment:
      • Windows 10
      • Wildfly 10.1.0 Final
      • Undertow Subsystem 1.4.13

      Description

      Context:
      A URL in the form of "http://somehost.org/path/a/b" should be rewritten to "http://somehost.org/newpath?param1=a&param2=b"

      The following filter should perform this rewrite:

      <expression-filter name="rewrite-path" expression="regex('^/path/([^/]+)/(.*)/?$') -> rewrite('/newpath'); set(attribute='%{QUERY_STRING}', value='param1=$1&amp;param2=$2'); done()"/>
      

      Problem:
      The output is (according to access-log);

      somehost.org "GET /newpath?param1=b 
      

      • param1 is assigned to the value of $2
      • param2 is dropped completly

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  mrkstr Markus Stier
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: