title: Resteasy always get application/json content type on request
body: <p>I have a web application that use Angularjs on frontend och Resteasy + Jackson on the back end. I'm sending a file from Angular component to a REST method, receiving method looks like this : </p>
  
  <pre><code>@POST
  @Path("/upload/attachment/for/{eventId}")
  @Consumes(MediaType.MULTIPART_FORM_DATA)
  public Response uploadFile(MultipartFormDataInput input,
                             final @PathParam("eventId") Long eventId,
                             @Context HttpServletRequest request) {
      Map&lt;String, List&lt;InputPart&gt;&gt; uploadForm = input.getFormDataMap();
      ...my awesome stuff...
  
      return Response.ok().build();
  
  }
  </code></pre>
  
  <p>And request has following headers when sent : </p>
  
  <pre><code>Accept  application/json, text/plain, */*
  Accept-Encoding gzip, deflate
  Accept-Language en-US,en;q=0.5
  Content-Length  347085
  Content-Type    multipart/form-data; boundary=---------------------------12164806981346771846716776342
  Cookie  JSESSIONID=aoBd1hgzR3GM8bSG5P-9g-vQ; csrftoken=ziQ7kN7TlMehR2aURDrmaMLYAroMsSpu
  Host    localhost:9000
  Referer http://localhost:9000/local/myapp/index.html
  User-Agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:32.0) Gecko/20100101 Firefox/32.0
  </code></pre>
  
  <p>The problem is that THIS request ALWAYS has <code>application/json</code> as a Content-Type instead for <code>multipart/form-data</code> as it says in the headers. And I get : </p>
  
  <pre><code>20:12:00,490 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (http-/127.0.0.1:8080-2) Failed executing POST /events/upload/attachment/for/null: org.jboss.resteasy.spi.UnsupportedMediaTypeException: Cannot consume content type
  </code></pre>
  
  <p>Already in <code>HttpServletDispatcher</code> the content is wrong. </p>
  
  <p>I can't get if this is JBOSS that set Content-Type to wrong value or some thing else. </p>