diff options
author | 2014-03-08 17:34:53 +0700 | |
---|---|---|
committer | 2014-03-08 17:34:53 +0700 | |
commit | d39d1bf69b4de2d8f12d4a7547cd9f7938dc1a52 (patch) | |
tree | e0af6f56bce6f4286407855add3709ef3850b147 /src/java/com/juick/http/www/Main.java | |
parent | 88f3693c53e70ad064ccc1466ddf27cae98db49a (diff) |
Errors.doGet404
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r-- | src/java/com/juick/http/www/Main.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java index 98034359..2c51456e 100644 --- a/src/java/com/juick/http/www/Main.java +++ b/src/java/com/juick/http/www/Main.java @@ -173,7 +173,7 @@ public class Main extends HttpServlet implements Stream.StreamListener { } else if (uri.equals("/pm/sent")) { pm.doGetSent(sql, request, response, visitor); } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } } else if (uri.equals("/logout")) { @@ -206,13 +206,13 @@ public class Main extends HttpServlet implements Stream.StreamListener { return; } } - response.sendError(404); + Errors.doGet404(sql, request, response); } else if (uri.matches("^/[^/]+$")) { com.juick.User user = com.juick.server.UserQueries.getUserByName(sql, request.getRequestURI().substring(1)); if (user != null) { Utils.sendPermanentRedirect(response, "/" + user.UName + "/"); } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } else if (uri.matches("^/.+/.*")) { String uriparts[] = uri.split("/"); @@ -241,19 +241,19 @@ public class Main extends HttpServlet implements Stream.StreamListener { pagesUserThread.doGetThread(sql, request, response, mid); } } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } } else if (user != null) { Utils.sendPermanentRedirect(response, "/" + user.UName + "/" + (uriparts.length > 2 ? uriparts[2] : "")); } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } else { - response.sendError(404); + Errors.doGet404(sql, request, response); } } |