You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Tadayoshi Sato (Jira)" <ji...@apache.org> on 2021/01/26 03:15:00 UTC
[jira] [Resolved] (CAMEL-16077) camel-undertow - not respect
content-type specified by REST DSL produces when body returns null
[ https://issues.apache.org/jira/browse/CAMEL-16077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tadayoshi Sato resolved CAMEL-16077.
------------------------------------
Fix Version/s: 3.8.0
Resolution: Fixed
> camel-undertow - not respect content-type specified by REST DSL produces when body returns null
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-16077
> URL: https://issues.apache.org/jira/browse/CAMEL-16077
> Project: Camel
> Issue Type: Bug
> Components: camel-undertow
> Affects Versions: 3.7.1
> Reporter: Tadayoshi Sato
> Assignee: Tadayoshi Sato
> Priority: Major
> Fix For: 3.8.0
>
>
> camel-undertow ignores content-type specified by REST DSL produces ({{"application/json"}}) and always returns {{"text/plain"}} when the exchange body returned from the REST endpoint is {{null}}:
> {code:xml}
> <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>
> {code}
> This behaviour doesn't align with camel-jetty & REST DSL or bare undertow server.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)