Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
commit
3d1d593438
|
@ -89,4 +89,13 @@ public class RedirectRegexRuleTest extends AbstractRuleTestCase
|
||||||
rule.matchAndApply("/api/rest/foo?id=100&sort=date", _request, _response);
|
rule.matchAndApply("/api/rest/foo?id=100&sort=date", _request, _response);
|
||||||
assertRedirectResponse(HttpStatus.MOVED_PERMANENTLY_301, "http://api.company.com/rest/foo?id=100&sort=date");
|
assertRedirectResponse(HttpStatus.MOVED_PERMANENTLY_301, "http://api.company.com/rest/foo?id=100&sort=date");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEncodedNewLineInURI() throws Exception
|
||||||
|
{
|
||||||
|
RedirectRegexRule rule = new RedirectRegexRule("(.+)$", "https://example$1");
|
||||||
|
|
||||||
|
rule.matchAndApply("/%0A.evil.com", _request, _response);
|
||||||
|
assertRedirectResponse(HttpStatus.FOUND_302, "https://example/%0A.evil.com");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue