aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-30 22:54:13 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-30 22:54:13 +1200
commitd6662317306b79717f9d3a1df30fc83cb87866ce (patch)
treea967be6a30f802562fe0030c103b37cd06d438d4 /src/org
parent1ac0692d07898889156a18848a23d6af889fa6c5 (diff)
downloadtraccar-server-d6662317306b79717f9d3a1df30fc83cb87866ce.tar.gz
traccar-server-d6662317306b79717f9d3a1df30fc83cb87866ce.tar.bz2
traccar-server-d6662317306b79717f9d3a1df30fc83cb87866ce.zip
Fix async servlet problem
Diffstat (limited to 'src/org')
-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) {