Skip to content

Commit 42a9194

Browse files
tomas-sexenianBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:FunnyFix' into beta
1 parent b927b16 commit 42a9194

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,15 @@ public String getString() {
703703
return "";
704704
try {
705705
this.setEntity();
706-
Charset charset = ContentType.getOrDefault(entity).getCharset();
707-
if (charset == null) {
706+
ContentType contentType = ContentType.getOrDefault(entity);
707+
Charset charset;
708+
if (contentType.equals(ContentType.DEFAULT_TEXT)) {
708709
charset = StandardCharsets.UTF_8;
710+
} else {
711+
charset = contentType.getCharset();
712+
if (charset == null) {
713+
charset = StandardCharsets.UTF_8;
714+
}
709715
}
710716
String res = EntityUtils.toString(entity, charset);
711717
eof = true;

0 commit comments

Comments
 (0)