Fix ForwardedHeaderFilter preserves semicolon content
Previously a requestURI that contained ';' would have the value incorrectly stripped out when using ForwardedHeaderFilter. This commit ensures that the ';' is preserved when using ForwardedHeaderFilter. Issue: SPR-15428
This commit is contained in:
@@ -171,6 +171,17 @@ public class ForwardedHeaderFilterTests {
|
||||
assertEquals("/", actual.getRequestURI());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestUriPreserveSemicolonContent() throws Exception {
|
||||
this.request.setContextPath("");
|
||||
this.request.setRequestURI("/path;a=b/with/semicolon");
|
||||
HttpServletRequest actual = filterAndGetWrappedRequest();
|
||||
|
||||
assertEquals("", actual.getContextPath());
|
||||
assertEquals("/path;a=b/with/semicolon", actual.getRequestURI());
|
||||
assertEquals("http://localhost/path;a=b/with/semicolon", actual.getRequestURL().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void caseInsensitiveForwardedPrefix() throws Exception {
|
||||
this.request = new MockHttpServletRequest() {
|
||||
|
||||
Reference in New Issue
Block a user