aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/MainServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/MainServlet.java')
-rw-r--r--src/org/traccar/http/MainServlet.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/http/MainServlet.java b/src/org/traccar/http/MainServlet.java
index a3eae4e55..87769b780 100644
--- a/src/org/traccar/http/MainServlet.java
+++ b/src/org/traccar/http/MainServlet.java
@@ -49,7 +49,9 @@ public class MainServlet extends HttpServlet {
String command = req.getPathInfo();
- if (command.equals("/async")) {
+ if (command == null) {
+ resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
+ } else if (command.equals("/async")) {
async(req.startAsync());
} else if (command.equals("/login")) {
login(req, resp);