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 @@ -249,6 +249,17 @@ public void contextPathWithForwardedPrefixTrailingSlash() throws Exception {
249
249
assertEquals ("/prefix" , actual );
250
250
}
251
251
252
+ @ Test
253
+ public void contextPathPreserveEncoding () throws Exception {
254
+ this .request .setContextPath ("/app%20" );
255
+ this .request .setRequestURI ("/app%20/path/" );
256
+ HttpServletRequest actual = filterAndGetWrappedRequest ();
257
+
258
+ assertEquals ("/app%20" , actual .getContextPath ());
259
+ assertEquals ("/app%20/path/" , actual .getRequestURI ());
260
+ assertEquals ("http://localhost/app%20/path/" , actual .getRequestURL ().toString ());
261
+ }
262
+
252
263
@ Test
253
264
public void sendRedirectWithAbsolutePath () throws Exception {
254
265
this .request .addHeader (X_FORWARDED_PROTO , "https" );
You can’t perform that action at this time.
0 commit comments