ok2c commented on code in PR #823:
URL: 
https://github.com/apache/httpcomponents-client/pull/823#discussion_r3099027161


##########
httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleBody.java:
##########
@@ -50,13 +50,31 @@ public final class SimpleBody {
         this.contentType = contentType;
     }
 
+    private static Charset getCharset(final ContentType contentType) {
+        if (contentType != null) {
+            final Charset charset = contentType.getCharset();
+            if (charset != null) {
+                return charset;
+            }
+            final String mimeType = contentType.getMimeType();
+            if (contentType.isSameMimeType(ContentType.APPLICATION_JSON)

Review Comment:
   @arturobernalg Oh, god. This is ugly. Just use always UTF-8 and be done with 
it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to