In the class HttpClientMarshaler which is used by HttpInvoker the
content-type and content-header are stripped from the message:
106 protected boolean shouldIncludeHeader(MessageExchange exchange,
String name, Object value) {
107 return value instanceof String &&
108 !"Content-Length".equalsIgnoreCase(name) &&
109 !"Content-Type".equalsIgnoreCase(name);
110 }
After that a content-type of text/html is added to the message:
054 marshaler.fromNMS(method, exchange, in);
055 if (method.getRequestHeader("Content-Type") == null) {
056 method.setRequestHeader("Content-Type", "text/html;
charset=UTF-8");
This seems always to be text/html which would limit the HttpInvoker to text
only. How would it be possible to send jpg or xml (soap) over http?
Correct me if I'm wrong but to me it seems to be a bug.
--
View this message in context:
http://www.nabble.com/wrong-http-header-t1608026.html#a4360567
Sent from the ServiceMix - User forum at Nabble.com.