Skip to content

Commit

Permalink
SAK-30890 - /direct results in an error page (sakaiproject#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespm committed Apr 21, 2016
1 parent de796a7 commit 4dab292
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,16 @@ protected void service(HttpServletRequest req, HttpServletResponse res)
protected void handleRequest(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
// catch the login helper posts
String option = req.getPathInfo();
String[] parts = option.split("/");
if ((parts.length == 2) && ((parts[1].equals("login")))) {
handleUserLogin(req, res, null);
} else {
dispatch(req, res);
// Note that with wrapped requests, URLUtils.getSafePathInfo may return null
// so we use the request URI
String uri = req.getRequestURI();
if ( uri != null ) {
String[] parts = uri.split("/");
if ((parts.length == 2) && ((parts[1].equals("login")))) {
handleUserLogin(req, res, null);
} else {
dispatch(req, res);
}
}
}

Expand Down

0 comments on commit 4dab292

Please sign in to comment.