You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2013/01/18 12:14:17 UTC
[jira] [Resolved] (HTTPCORE-328) EntityUtils#toString ignores
default charset parameter if there is no ContentType in the http response
[ https://issues.apache.org/jira/browse/HTTPCORE-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-328.
----------------------------------------
Resolution: Fixed
Fixed in SVN trunk and 4.2.x branch. Please review / re-test.
Oleg
> EntityUtils#toString ignores default charset parameter if there is no ContentType in the http response
> ------------------------------------------------------------------------------------------------------
>
> Key: HTTPCORE-328
> URL: https://issues.apache.org/jira/browse/HTTPCORE-328
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Components: HttpCore
> Affects Versions: 4.2.3
> Environment: Eclipse 3.7 SR2
> Oracle Java EE 1.6.0
> Windows XP SP3
> Reporter: kuyurmoe
> Labels: bug,, charset,, httpcore
> Fix For: 4.2.4, 4.3-alpha2
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org