jira-importer opened a new issue, #860: URL: https://github.com/apache/httpcomponents-core/issues/860
**[kuyurmoe](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kuyurmoe)** opened **[HTTPCORE-328](https://issues.apache.org/jira/browse/HTTPCORE-328?redirect=false)** and commented There is a http response with 500 status and error message encoded in UTF-8 in ContentBody, but without ContentType header. When using EntityUtils.toString to get message like: EntityUtils.toString(response.getEntity(), "UTF-8") the defaultCharset will never work. The real charset becomes ISO_8859_1 because ContentType.getOrDefault(entity) will return a ContentType holding a never null charset(ISO_8859_1). It can not be overrided by defaultCharset anymore. --- **Affects:** 4.2.3 **Issue Links:** - [HTTPCORE-329](https://issues.apache.org/jira/browse/HTTPCORE-329) EntityUtils.toString uses wrong charset if no content-type is provided by server (_**"is duplicated by"**_) **Backported to:** [4.2.4](https://github.com/apache/httpcomponents-core/milestone/27?closed=1) -- 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]
