Skip to content

Commit f476368

Browse files
committed
Charset of response must be geted from response.getEntity() instead of the ByteArrayEntity that is build in setEntity method (#948)
(cherry picked from commit cfd886a)
1 parent a2b8b75 commit f476368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/src/main/java/com/genexus/internet/HttpClientJavaLib.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ public String getString() {
728728
return "";
729729
try {
730730
this.setEntity();
731-
Charset charset = ContentType.getOrDefault(entity).getCharset();
731+
Charset charset = ContentType.getOrDefault(response.getEntity()).getCharset();
732732
String res = EntityUtils.toString(entity, charset);
733733
if (res.matches(".*[Ã-ÿ].*")) {
734734
res = EntityUtils.toString(entity, StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)