File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
spring-web/src/test/java/org/springframework/web/filter Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,17 @@ public void contextPathWithForwardedPrefixTrailingSlash() throws Exception {
245
245
assertEquals ("/prefix" , actual );
246
246
}
247
247
248
+ @ Test
249
+ public void contextPathPreserveEncoding () throws Exception {
250
+ this .request .setContextPath ("/app%20" );
251
+ this .request .setRequestURI ("/app%20/path/" );
252
+ HttpServletRequest actual = filterAndGetWrappedRequest ();
253
+
254
+ assertEquals ("/app%20" , actual .getContextPath ());
255
+ assertEquals ("/app%20/path/" , actual .getRequestURI ());
256
+ assertEquals ("http://localhost/app%20/path/" , actual .getRequestURL ().toString ());
257
+ }
258
+
248
259
@ Test
249
260
public void sendRedirectWithAbsolutePath () throws Exception {
250
261
this .request .addHeader (X_FORWARDED_PROTO , "https" );
You can’t perform that action at this time.
0 commit comments