title: mule esb outbound https invalid content-type
body: <p>I am using Mule 3.4.0 and am making a flow that calls some RESTful API endpoints on a JIRA server using an HTTPS outbound endpoint. I am having a problem because Mule is for some reason sending a Content-Type header value that causes an exception in JIRA. It looks like, judging from the JIRA stack trace, that Mule is sending this:</p>
  
  <blockquote>
    <p>application/json, application/json;charset=UTF-8</p>
  </blockquote>
  
  <p>JIRA is using Jersey and Jersey is unable to parse that Content-Type value. Here is a portion of the stack trace returned by JIRA:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Error parsing media type &amp;#39;application/json, application/json;charset=UTF-8&amp;#39;
        at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.fromString(MediaTypeProvider.java:79)
        at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.fromString(MediaTypeProvider.java:53)
        at javax.ws.rs.core.MediaType.valueOf(MediaType.java:119)
        at com.sun.jersey.server.impl.model.HttpHelper.getContentType(HttpHelper.java:89)
        ... 157 more
    Caused by: java.text.ParseException: Expected separator &amp;#39;;&amp;#39; instead of &amp;#39;,&amp;#39;
        at com.sun.jersey.core.header.reader.HttpHeaderReader.nextSeparator(HttpHeaderReader.java:117)
        at com.sun.jersey.core.header.reader.HttpHeaderReader.readParameters(HttpHeaderReader.java:239)
        at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.valueOf(MediaTypeProvider.java:97)
        at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.fromString(MediaTypeProvider.java:77)</p>
  </blockquote>
  
  <p>I would like to be able to force a specific Content-Type value to be sent, but I can't figure out how to do that. It seems like Mule automatically builds the Content-Type value based on a combination of factors:</p>
  
  <p><a href="http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference" rel="nofollow">http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference</a></p>
  
  <blockquote>
    <p>If the endpoint has encoding set explicitly, use that
        Otherwise, take it from the message's property Content-Type
        If none of these is set, use the Mule Context's configuration default.
        For Content-Type, send the message's property Content-Type but with the actual encoding set.</p>
  </blockquote>
  
  <p>So I think it's using the inbound property Content-Type, but since that's an inbound property I don't think I can modify/delete that in the flow. My attempts to modify/delete the Content-Type property have been ineffective. I can only modify/delete the outbound Content-Type property, which doesn't seem to help with my outbound HTTP request.</p>
  
  <p>Any info on how to control the Content-Type value or fix it or something would be appreciated.</p>