From 0b70523372102d0b3b04b2ffac633b7ea89657f1 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Tue, 13 Jun 2023 15:51:06 +0200 Subject: [PATCH] LDEV-1856 - use charset set when available --- core/src/main/java/lucee/runtime/tag/Http.java | 5 +++-- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/lucee/runtime/tag/Http.java b/core/src/main/java/lucee/runtime/tag/Http.java index 65526f7ea3..565503070c 100755 --- a/core/src/main/java/lucee/runtime/tag/Http.java +++ b/core/src/main/java/lucee/runtime/tag/Http.java @@ -1276,8 +1276,9 @@ else if (strPath != null) { Charset responseCharset = StringUtil.isEmpty(tmp, true) ? null : CharsetUtil.toCharset(tmp); // store to memory String str; - if (barr == null) str = contentAsString(rsp, responseCharset, contentEncoding, e); - else str = IOUtil.toString(barr, responseCharset); + Charset cs = (StringUtil.isEmpty(charset)) ? responseCharset : CharsetUtil.toCharset(charset, responseCharset); + if (barr == null) str = contentAsString(rsp, cs, contentEncoding, e); + else str = IOUtil.toString(barr, cs); cfhttp.set(KeyConstants._filecontent, str); // store to file diff --git a/loader/build.xml b/loader/build.xml index 713ec410d5..36c3a6c3d2 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index f8c1615d86..9f181ab0e0 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 5.4.0.78-SNAPSHOT + 5.4.0.79-SNAPSHOT jar Lucee Loader Build