aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/BaseServlet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/BaseServlet.java')
-rw-r--r--src/org/traccar/http/BaseServlet.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/http/BaseServlet.java b/src/org/traccar/http/BaseServlet.java
index 9dba2e647..89eefc11c 100644
--- a/src/org/traccar/http/BaseServlet.java
+++ b/src/org/traccar/http/BaseServlet.java
@@ -34,8 +34,11 @@ public abstract class BaseServlet extends HttpServlet {
@Override
protected final void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String command = req.getPathInfo();
+ if (command == null) {
+ command = "";
+ }
try {
- if (command == null || !handle(command, req, resp)) {
+ if (!handle(command, req, resp)) {
resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
} catch (Exception error) {