diff options
author | Anton Tananaev <anton@traccar.org> | 2023-11-21 06:48:25 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-11-21 06:48:25 -0800 |
commit | 01a4721538ef5ab75b708d2e0084e0f489451630 (patch) | |
tree | 29d8884ffab5c53088e5cab923db70a4f0379c63 /src | |
parent | d02ca68f6a73dbf35f734fc8e4be85ba8563e839 (diff) | |
download | trackermap-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.java | 5 |
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); |