aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r--src/org/traccar/http/AsyncServlet.java3
-rw-r--r--src/org/traccar/http/BaseServlet.java5
2 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/http/AsyncServlet.java b/src/org/traccar/http/AsyncServlet.java
index 2ccb73f06..47ffda3ad 100644
--- a/src/org/traccar/http/AsyncServlet.java
+++ b/src/org/traccar/http/AsyncServlet.java
@@ -27,9 +27,7 @@ import java.util.concurrent.TimeUnit;
import javax.json.Json;
import javax.json.JsonObjectBuilder;
import javax.servlet.AsyncContext;
-import javax.servlet.ServletException;
import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jboss.netty.util.Timeout;
@@ -39,7 +37,6 @@ import org.traccar.GlobalTimer;
import org.traccar.database.ConnectionManager;
import org.traccar.helper.Log;
import org.traccar.model.Position;
-import org.traccar.model.User;
public class AsyncServlet extends BaseServlet {
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) {