hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Zlatanov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1466) FileBodyPart.generateContentType() method ignores ContentType parameters
Date Fri, 21 Feb 2014 14:06:22 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908339#comment-13908339
] 

Bogdan Zlatanov commented on HTTPCLIENT-1466:
---------------------------------------------

Works great. Tested with 4.3.3-SNAPSHOT. Thanks.

> FileBodyPart.generateContentType() method ignores ContentType parameters
> ------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1466
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1466
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpMime
>    Affects Versions: 4.3.1, 4.3.2
>         Environment: OS X 10.9.1 Mavericks, Apple WebObjects, Project Wonder
>            Reporter: Bogdan Zlatanov
>             Fix For: 4.3.3, 4.4 Alpha1
>
>
> When generating the Content-Type header of a body part the FileBodyPart.generateContentType()
method does not take into account possible Content-Type parameters.
> Up to version 4.2.3 I used to add the parameters by appending them to the MIME type,
e.g. "application/xml; param=XYZ". Since ver. 4.3.1, however, the ContentType constructor
has an additional check - Args.check(valid(type), "MIME type may not contain reserved characters");
- which fails because of the semi-colon.
> A proper fix seems not very trivial though, as access to content-type parameters could
be gained through neither ContentBody, nor ContentDescriptor.  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message