aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/DeviceServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/DeviceServlet.java')
-rw-r--r--src/org/traccar/http/DeviceServlet.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/http/DeviceServlet.java b/src/org/traccar/http/DeviceServlet.java
index 4f8f6961d..c994ed266 100644
--- a/src/org/traccar/http/DeviceServlet.java
+++ b/src/org/traccar/http/DeviceServlet.java
@@ -36,7 +36,9 @@ public class DeviceServlet extends HttpServlet {
String command = req.getPathInfo();
- if (command.equals("/get")) {
+ if (command == null) {
+ resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
+ } else if (command.equals("/get")) {
get(req, resp);
} else if (command.equals("/add")) {
add(req, resp);
@@ -44,6 +46,8 @@ public class DeviceServlet extends HttpServlet {
update(req, resp);
} else if (command.equals("/remove")) {
remove(req, resp);
+ } else {
+ resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
}