]
Stuart Douglas commented on WFLY-8642:
--------------------------------------
If you use ${1} instead of $1 it will work for now. I will fix the parse so it interprets
& as the end of the token.
rewrite handler handles references to contextual values incorrect
-----------------------------------------------------------------
Key: WFLY-8642
URL:
https://issues.jboss.org/browse/WFLY-8642
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 10.1.0.Final
Environment: * Windows 10
* Wildfly 10.1.0 Final
Reporter: Markus Stier
Assignee: Stuart Douglas
Context:
A URL in the form of "http://somehost.org/path/a/b" should be rewritten to
"http://somehost.org/newpath?param1=a¶m2=b"
The following filter should perform this rewrite:
{code}
<expression-filter name="rewrite-path"
expression="regex('^/path/([^/]+)/(.*)/?$') ->
rewrite('/newpath'); set(attribute='%{QUERY_STRING}',
value='param1=$1&param2=$2'); done()"/>
{code}
Problem:
The output is (according to access-log);
{code}
somehost.org "GET /newpath?param1=b
{code}
* param1 is assigned to the value of $2
* param2 is dropped completly