You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2012/01/25 20:36:38 UTC
svn commit: r1235881 -
/sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java
Author: fmeschbe
Date: Wed Jan 25 19:36:38 2012
New Revision: 1235881
URL: http://svn.apache.org/viewvc?rev=1235881&view=rev
Log:
SLING-2383 Redirect to servlet context root if the target path is not valid
Modified:
sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java
Modified: sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java?rev=1235881&r1=1235880&r2=1235881&view=diff
==============================================================================
--- sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java (original)
+++ sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/AuthUtil.java Wed Jan 25 19:36:38 2012
@@ -249,8 +249,10 @@ public final class AuthUtil {
if (AuthUtil.isRedirectValid(request, target)) {
b.append(target);
- } else {
+ } else if (request.getContextPath().length() == 0) {
b.append("/");
+ } else {
+ b.append(request.getContextPath());
}
if (params == null) {