Throw exception if URL does not include context path when context relative

Issue: gh-8399
This commit is contained in:
Astushi Yoshikawa
2020-04-16 20:12:03 +09:00
committed by Eleftheria Stein-Kousathana
parent dc514b369e
commit f08ca4e688
2 changed files with 3 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ public class DefaultRedirectStrategy implements RedirectStrategy {
}
if (!url.contains(contextPath)) {
return "";
throw new IllegalArgumentException("The fully qualified URL does not include context path.");
}
// Calculate the relative URL from the fully qualified URL, minus the last