-
Bug
-
Resolution: Done
-
Major
-
fuse-7.7-GA
-
None
-
False
-
False
-
%
-
-
+
-
Undefined
-
-
Even Rest DSL sets "application/json" to "produces" option, camel-undertow overrides the content-type header values with "text/plain" when the exchange body is null.
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <restConfiguration bindingMode="auto" component="undertow" contextPath="test" host="localhost" port="8005"/> <rest id="rest-0b0215bd-f133-46f8-968c-4fe21ba4af4f" path="demo"> <get id="get-1" produces="application/json" uri="/ping"> <description>direct:hello</description> <route> <to uri="direct:hello"/> </route> </get> </rest> <route id="simple-route"> <from id="_from1" uri="direct:hello"/> <setBody id="_setBody1"> <simple>${null}</simple> </setBody> <log id="route-log" message=">>> ${body}"/> </route> </camelContext>
At least, Rest DSL with jetty component does response with "application/json" content-type header.