revert-70aa11f8
harshanl 9 years ago
commit 30dfa7600e

@ -64,14 +64,18 @@ public class WebappAuthenticationHandler extends CarbonTomcatValve {
if (ctx == null || "".equals(ctx)) { if (ctx == null || "".equals(ctx)) {
ctx = request.getContextPath(); ctx = request.getContextPath();
if (ctx == null || "".equals(ctx)) { if (ctx == null || "".equals(ctx)) {
String requestUri = request.getRequestURI();
if ("/".equals(requestUri)) {
return true;
}
StringTokenizer tokenizer = new StringTokenizer(request.getRequestURI(), "/"); StringTokenizer tokenizer = new StringTokenizer(request.getRequestURI(), "/");
ctx = tokenizer.nextToken(); if (!tokenizer.hasMoreTokens()) {
if (ctx == null || "".equals(ctx)) { return false;
return false;
} }
ctx = tokenizer.nextToken();
} }
} }
return ctx.equalsIgnoreCase("carbon") || ctx.equalsIgnoreCase("services"); return (ctx.equalsIgnoreCase("carbon") || ctx.equalsIgnoreCase("services"));
} }
private void processResponse(Request request, Response response, CompositeValve compositeValve, private void processResponse(Request request, Response response, CompositeValve compositeValve,

Loading…
Cancel
Save