aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-11-21 06:48:25 -0800
committerAnton Tananaev <anton@traccar.org>2023-11-21 06:48:25 -0800
commit01a4721538ef5ab75b708d2e0084e0f489451630 (patch)
tree29d8884ffab5c53088e5cab923db70a4f0379c63 /src
parentd02ca68f6a73dbf35f734fc8e4be85ba8563e839 (diff)
downloadtrackermap-server-01a4721538ef5ab75b708d2e0084e0f489451630.tar.gz
trackermap-server-01a4721538ef5ab75b708d2e0084e0f489451630.tar.bz2
trackermap-server-01a4721538ef5ab75b708d2e0084e0f489451630.zip
Fix override filter length issue
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/web/OverrideFilter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/web/OverrideFilter.java b/src/main/java/org/traccar/web/OverrideFilter.java
index 917fb74cc..9780c9ede 100644
--- a/src/main/java/org/traccar/web/OverrideFilter.java
+++ b/src/main/java/org/traccar/web/OverrideFilter.java
@@ -75,8 +75,9 @@ public class OverrideFilter implements Filter {
.replace("${description}", description)
.replace("${colorPrimary}", colorPrimary);
- response.setContentLength(alteredContent.length());
- response.getOutputStream().write(alteredContent.getBytes());
+ byte[] data = alteredContent.getBytes();
+ response.setContentLength(data.length);
+ response.getOutputStream().write(data);
} else {
response.getOutputStream().write(bytes);