You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jared Jacobs (JIRA)" <ji...@apache.org> on 2009/11/26 17:26:39 UTC
[jira] Closed: (HTTPCLIENT-885) URLEncodedUtils fails to parse
form-url-encoded entities that specify a charset
[ https://issues.apache.org/jira/browse/HTTPCLIENT-885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jared Jacobs closed HTTPCLIENT-885.
-----------------------------------
Fix and associated test case look good to me. Thanks.
> URLEncodedUtils fails to parse form-url-encoded entities that specify a charset
> -------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-885
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-885
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.0 Final
> Environment: all
> Reporter: Jared Jacobs
> Priority: Minor
> Fix For: 4.0.1, 4.1 Alpha1
>
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> If a form-url-encoded HTTP entity specifies a charset in its Content-Type header, then URLEncodedUtils.parse(HttpEntity) fails to parse it.
> An entity with content type "application/x-www-form-urlencoded; charset=UTF-8" should be detected as form-url-encoded and parsed as such, honoring the specified character set. Currently the code requires an exact, case-insensitive match with "application/x-www-form-urlencoded" for an entity to be detected as form-url-encoded.
> It appears that the author of URLEncodedUtils.parse(HttpEntity) tried to take character sets into account, but expected to find them in the Content-Encoding header instead of as a parameter in the Content-Length header. The HTTP 1.1 spec makes it clear that the Content-Encoding header is for specifying transformations like gzip compression or the identity transformation -- not for specifying the entity's character set.
> Here are some helpful links.
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.4
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
> This is related to: https://issues.apache.org/jira/browse/HTTPCLIENT-884
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org