aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index 075b33fa..99d06fe6 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -182,7 +182,7 @@ public class Main extends HttpServlet {
pm.doGetInbox(sql, request, response, visitor);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
break;
case "/pm/sent":
@@ -190,7 +190,7 @@ public class Main extends HttpServlet {
pm.doGetSent(sql, request, response, visitor);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
break;
default:
@@ -206,10 +206,10 @@ public class Main extends HttpServlet {
rss.doGet(sql, response, uid);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} else if (uri.equals("/logout")) {
login.doGetLogout(sql, request, response);
@@ -218,7 +218,7 @@ public class Main extends HttpServlet {
settings.doGet(sql, request, response);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
} else if (uri.equals("/_fblogin")) {
loginFacebook.doGet(sql, request, response);
@@ -231,7 +231,7 @@ public class Main extends HttpServlet {
signup.doGet(sql, request, response);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
} else if (uri.equals("/help") || uri.equals("/help/")) {
help.doRedirectToHelpIndex(response);
@@ -240,10 +240,10 @@ public class Main extends HttpServlet {
help.doGetHelp(sql, request, response);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} catch (URISyntaxException e) {
log("help exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
} else if (uri.startsWith("/tag/")) {
discover.doGet(sql, sqlSearch, request, response);
@@ -332,7 +332,7 @@ public class Main extends HttpServlet {
if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostMessage(sql, request, response, xmpp, visitor);
} else {
- response.sendError(403);
+ response.sendError(HttpServletResponse.SC_FORBIDDEN);
}
break;
}
@@ -341,7 +341,7 @@ public class Main extends HttpServlet {
if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostComment(sql, request, response, xmpp, visitor);
} else {
- response.sendError(403);
+ response.sendError(HttpServletResponse.SC_FORBIDDEN);
}
break;
}
@@ -350,7 +350,7 @@ public class Main extends HttpServlet {
if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostRecomm(sql, request, response, xmpp, visitor);
} else {
- response.sendError(403);
+ response.sendError(HttpServletResponse.SC_FORBIDDEN);
}
break;
}
@@ -359,7 +359,7 @@ public class Main extends HttpServlet {
if (visitor.getUid() > 0 && !visitor.isBanned()) {
pm.doPostPM(sql, request, response, xmpp, visitor);
} else {
- response.sendError(403);
+ response.sendError(HttpServletResponse.SC_FORBIDDEN);
}
break;
}
@@ -374,11 +374,11 @@ public class Main extends HttpServlet {
settings.doPost(sql, request, response);
} catch (PebbleException e) {
log("pebble exception", e);
- response.sendError(500);
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
break;
default:
- response.sendError(405);
+ response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
break;
}
}