Cservenak, Tamas created HTTPCLIENT-1514:
--------------------------------------------
Summary: org.apache.http.entity.ContentType#get method is too
strict regarding malformed Content-Type headers
Key: HTTPCLIENT-1514
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1514
Project: HttpComponents HttpClient
Issue Type: Improvement
Components: HttpClient
Affects Versions: 4.3.3
Reporter: Cservenak, Tamas
Priority: Minor
One HTTP server serving up ZIP/JAR file sends this header in it's response:
{noformat}
Content-Type: application/zip; charset=binary
{noformat}
While this is _malformed_ header value (according to rfc2068 "Applications
SHOULD limit their use of character sets to those defined by the IANA
registry", and IANA does not define "binary"), HttpClient should be more robust
IMO.
In this case, it might accept the mime type {{application/zip}} only and just
neglect the charset (that results in
{{java.nio.charset.UnsupportedCharsetException: binary}} anyway), since
{{application/zip}} is not a text subtype.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]