Resteasy 2.3.5.Final has function "setMediaType" what allowed force madiatype and charset.
http://docs.jboss.org/resteasy/docs/2.3.5.Final/javadocs/org/jboss/resteasy/plugins/providers/multipart/MultipartInputImpl.PartImpl.html#setMediaType%28javax.ws.rs.core.MediaType%29
Example of usage for jbpm-console-server FormProcessingFacade.java
| | if("text".equals(mType) && "plain".equals(mSubtype)) |
| | { |
| | // RFC2045: Each part has an optional "Content-Type" header |
| | // that defaults to "text/plain". |
| | // Can go into process without conversion |
| | | if ( !part.isContentTypeFromMessage()) |
| | | { |
| | | | //log.error("getBodyAsString "+part.getBodyAsString()); |
| | | | part.setMediaType(MediaType.TEXT_PLAIN_TYPE); |
| | | | //log.error("getBodyAsString "+part.getBodyAsString()); | |
| | | } |
....
}