diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/TelicProtocolDecoder.java | 4 | ||||
-rw-r--r-- | src/org/traccar/web/WebServer.java | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TelicProtocolDecoder.java b/src/org/traccar/protocol/TelicProtocolDecoder.java index 62b756ab5..a875009a1 100644 --- a/src/org/traccar/protocol/TelicProtocolDecoder.java +++ b/src/org/traccar/protocol/TelicProtocolDecoder.java @@ -34,8 +34,8 @@ public class TelicProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN = new PatternBuilder() .number("dddd") - .number("(d{6})") // device id - .number("(d+),") // type + .number("(d{6}|d{15})") // device id + .number("(dd),") // type .number("d{12},") // event time .number("d+,") .number("(dd)(dd)(dd)") // date (ddmmyy) diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 83ead7ad8..2055d1161 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -105,7 +105,10 @@ public class WebServer { resourceHandler.setWelcomeFiles(new String[] {"debug.html", "index.html"}); resourceHandler.setMinMemoryMappedContentLength(-1); // avoid locking files on Windows } else { - resourceHandler.setCacheControl("max-age=3600,public"); + String cache = config.getString("web.cacheControl"); + if (cache != null && !cache.isEmpty()) { + resourceHandler.setCacheControl(cache); + } resourceHandler.setWelcomeFiles(new String[] {"release.html", "index.html"}); } handlers.addHandler(resourceHandler); |