[ 
https://issues.apache.org/jira/browse/HTTPCORE-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCORE-476.
----------------------------------------
    Resolution: Invalid


{{.setHeader("Content-Type", constant("application/json;odata=verbose"))}}

{{application/json;odata=verbose}} is a valid content type but it is not a 
valid type / subtype pair, so {{ContentType#create}} is correct in rejecting it.

I also see no evidence of {{ContentType#parse}} doing anything incorrectly

{code:java}
final ContentType contentType = 
ContentType.parse("multipart/form-data;boundary=---------------------------j2radvtrk");
Assert.assertEquals("multipart/form-data", contentType.getMimeType());
Assert.assertEquals("---------------------------j2radvtrk", 
contentType.getParameter("boundary"));
{code}

Oleg

> ContentType.create fails even if it is compatible to a valid content type 
> according to the RFC: https://tools.ietf.org/html/rfc2045#section-5.1
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-476
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-476
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>    Affects Versions: 4.4.6
>         Environment: all
>            Reporter: Önder Sezgin
>             Fix For: 4.4.7
>
>
> ContentType.create fails even if it is compatible to a valid content type 
> according to the RFC: https://tools.ietf.org/html/rfc2045#section-5.1
> whereas ContentType.parse does not.
> And additionally ContentType.parse can not be called for everything. 
> Because it drops bolded part of such header 
> "multipart/form-data;boundary*=---------------------------j2radvtrk*"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to