| Summary: | RewriteRegexRule fails if replacement url contains '$' characters | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Peter Balsiger <balsiger> |
| Component: | server | Assignee: | Michael Gorovoy <mgorovoy> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | jetty-inbox, mgorovoy |
| Version: | 8.0.0 | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Committed the fix and the unit test for this issue to Jetty 7.5.x master. This fix will be merged to Jetty 8.x during the next merge cycle. I'm going to keep this ticket open till the merge happens, that should be done very soon as 8.0.0.RC0 build is forthcoming. This fix been merged into jetty-8 branch, marking as resolved. |
When using a rewrite regex rule, having a '$' in the URL fails with a 'illegal group' IllegalArgumentException. To fix this, line 57 should be changed fom String group = matcher.group(g); to String group = Matcher.quoteReplacement(matcher.group(g)); (at least this works afterwards for me).