@@ -240,33 +240,10 @@ public void sendRedirectWithContextPath() throws Exception {
240
240
this .request .addHeader (X_FORWARDED_PORT , "443" );
241
241
this .request .setContextPath ("/context" );
242
242
243
- String redirectedUrl = sendRedirect ("/foo/bar" );
243
+ String redirectedUrl = sendRedirect ("/context/ foo/bar" );
244
244
assertEquals ("https://example.com/context/foo/bar" , redirectedUrl );
245
245
}
246
246
247
- @ Test
248
- public void sendRedirectWithXForwardedPrefix () throws Exception {
249
- this .request .addHeader (X_FORWARDED_PROTO , "https" );
250
- this .request .addHeader (X_FORWARDED_HOST , "example.com" );
251
- this .request .addHeader (X_FORWARDED_PORT , "443" );
252
- this .request .addHeader (X_FORWARDED_PREFIX , "/prefix" );
253
-
254
- String redirectedUrl = sendRedirect ("/foo/bar" );
255
- assertEquals ("https://example.com/prefix/foo/bar" , redirectedUrl );
256
- }
257
-
258
- @ Test
259
- public void sendRedirectWithXForwardedPrefixAndContextPath () throws Exception {
260
- this .request .addHeader (X_FORWARDED_PROTO , "https" );
261
- this .request .addHeader (X_FORWARDED_HOST , "example.com" );
262
- this .request .addHeader (X_FORWARDED_PORT , "443" );
263
- this .request .addHeader (X_FORWARDED_PREFIX , "/prefix" );
264
- this .request .setContextPath ("/context" );
265
-
266
- String redirectedUrl = sendRedirect ("/foo/bar" );
267
- assertEquals ("https://example.com/prefix/foo/bar" , redirectedUrl );
268
- }
269
-
270
247
@ Test
271
248
public void sendRedirectWithRelativePath () throws Exception {
272
249
this .request .addHeader (X_FORWARDED_PROTO , "https" );
0 commit comments