Skip to content

Commit cfd886a

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

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

Lines changed: 1 addition & 1 deletion
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)