You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "tosheer kalra (JIRA)" <ji...@apache.org> on 2012/12/03 10:25:59 UTC

[jira] [Commented] (CAMEL-1095) camel-jetty - Content-Type should be set on response if provided as OUT header

    [ https://issues.apache.org/jira/browse/CAMEL-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508604#comment-13508604 ] 

tosheer kalra commented on CAMEL-1095:
--------------------------------------

Claus,

We are still facing the mentioned issue.

Camel Version: 2.9.2
Camel Jetty Jar Version 2.9.0

Problem statement: Although I include the statement setHeader("Content-Type", "application/json"); or setHeader("Content-Type", "application/xml");, upon debugging I can see the following behaviour.

1.) Class "DefaultHeaderFilterStrategy", method "doFiltering" contains "Content-Type" as one of the filters to skip. Thus it removes the "Content-Type" from header if mentioned explicitly also.

Please provide the resolution to set the "Content-Type" in response header or please let us know in-case we are missing something. 
                
> camel-jetty - Content-Type should be set on response if provided as OUT header
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-1095
>                 URL: https://issues.apache.org/jira/browse/CAMEL-1095
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jetty
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.6.0, 2.0-M1
>
>
> The Content-Type is not set in HttpBinding if an end-user has provided one as a OUT header.
> So if an user exposes a Jetty service and lets requests fly in that is text/plain and want to return a response that is image/jpeg or the likes the content type can not be set as:
>             exchange.getOut().setHeader("Content-Type", "image/jpeg");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira