aboutsummaryrefslogtreecommitdiff
path: root/juick-rss/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-23 12:08:45 +0300
committerGravatar Vitaly Takmazov2016-11-23 12:08:45 +0300
commit42718787291bed507caf4f7ae13f6c41f9b8d7ff (patch)
tree2ba7bb057a6a740e98c5f4d6dae813af1a6b977f /juick-rss/src/main/java/com
parentaa3c1a06ed46f49b617e2956b6cf9a1b0d367fb0 (diff)
using HttpServletResponse status codes
Diffstat (limited to 'juick-rss/src/main/java/com')
-rw-r--r--juick-rss/src/main/java/com/juick/rss/Main.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/juick-rss/src/main/java/com/juick/rss/Main.java b/juick-rss/src/main/java/com/juick/rss/Main.java
index 029057e3..04d87729 100644
--- a/juick-rss/src/main/java/com/juick/rss/Main.java
+++ b/juick-rss/src/main/java/com/juick/rss/Main.java
@@ -77,14 +77,14 @@ public class Main extends HttpServlet {
List<Message> msgs = MessagesQueries.getMessages(sql, mids);
responseMessages(response, 0, null, msgs);
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} else if (uri.equals("/comments")) {
int hours = NumberUtils.toInt(request.getParameter("hours"), 0);
if (hours > 0 && hours < 13) {
responseReplies(response, hours);
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} else if (uri.matches("^/[a-zA-Z0-9\\-]{2,16}/blog$")) {
String uname = uri.substring(1, uri.length() - 5);
@@ -95,13 +95,13 @@ public class Main extends HttpServlet {
List<Message> msgs = MessagesQueries.getMessages(sql, mids);
responseMessages(response, uid, uname, msgs);
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} else {
- response.sendError(404);
+ response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
}