diff options
author | 2016-11-23 12:08:45 +0300 | |
---|---|---|
committer | 2016-11-23 12:08:45 +0300 | |
commit | 42718787291bed507caf4f7ae13f6c41f9b8d7ff (patch) | |
tree | 2ba7bb057a6a740e98c5f4d6dae813af1a6b977f /juick-www/src/main/java/com/juick/www/PM.java | |
parent | aa3c1a06ed46f49b617e2956b6cf9a1b0d367fb0 (diff) |
using HttpServletResponse status codes
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/PM.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/PM.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PM.java b/juick-www/src/main/java/com/juick/www/PM.java index 79128e3d..78dbff10 100644 --- a/juick-www/src/main/java/com/juick/www/PM.java +++ b/juick-www/src/main/java/com/juick/www/PM.java @@ -99,12 +99,12 @@ public class PM { String body = request.getParameter("body"); if (uid == 0 || body == null || body.length() < 1 || body.length() > 10240) { - response.sendError(400); + response.sendError(HttpServletResponse.SC_BAD_REQUEST); return; } if (UserQueries.isInBLAny(sql, uid, visitor.getUid())) { - response.sendError(403); + response.sendError(HttpServletResponse.SC_FORBIDDEN); return; } @@ -143,7 +143,7 @@ public class PM { Utils.sendTemporaryRedirect(response, "/pm/sent"); } else { - response.sendError(500); + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } } |