diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-27 15:27:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-27 15:27:22 +1200 |
commit | e02651741e455c8263c412cf9e14ed3e2d9834fe (patch) | |
tree | 115d684ccdbbcd61b34cdb66cfe1d3dbfc457605 /src/org/traccar/http/MainServlet.java | |
parent | f61e2b5c21c1df4da2c8aa77e4bf33589b4b49a6 (diff) | |
download | trackermap-server-e02651741e455c8263c412cf9e14ed3e2d9834fe.tar.gz trackermap-server-e02651741e455c8263c412cf9e14ed3e2d9834fe.tar.bz2 trackermap-server-e02651741e455c8263c412cf9e14ed3e2d9834fe.zip |
Handle null request in servlet
Diffstat (limited to 'src/org/traccar/http/MainServlet.java')
-rw-r--r-- | src/org/traccar/http/MainServlet.java | 4 |
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); |