diff options
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r-- | src/java/com/juick/http/www/Main.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java index 998fb4f3..59065341 100644 --- a/src/java/com/juick/http/www/Main.java +++ b/src/java/com/juick/http/www/Main.java @@ -143,28 +143,24 @@ public class Main extends HttpServlet implements Stream.StreamListener { if (uri.equals("/")) { com.juick.User visitor = Utils.getVisitorUser(sql, request, response); - if (visitor == null) { - login.doGetLoginForm(sql, request, response); - } else { - home.doGet(sql, sqlSearch, request, response, visitor); - } + home.doGet(sql, sqlSearch, request, response, visitor); } else if (uri.equals("/post")) { com.juick.User visitor = Utils.getVisitorUser(sql, request, response); if (visitor != null) { pagesNewMessage.doGetNewMessage(sql, request, response, visitor); } else { - Utils.sendTemporaryRedirect(response, "/"); + Utils.sendTemporaryRedirect(response, "/login"); } } else if (uri.equals("/login")) { if (request.getQueryString() == null) { - Utils.sendPermanentRedirect(response, "/"); + login.doGetLoginForm(sql, request, response); } else { login.doGetLogin(sql, request, response); } } else if (uri.startsWith("/pm/")) { com.juick.User visitor = Utils.getVisitorUser(sql, request, response); if (visitor == null) { - login.doGetLoginForm(sql, request, response); + Utils.sendTemporaryRedirect(response, "/login"); } else { if (uri.equals("/pm/inbox")) { pm.doGetInbox(sql, request, response, visitor); |