aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/web')
-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);