You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rajesh Pote (Jira)" <ji...@apache.org> on 2019/11/28 14:33:00 UTC

[jira] [Comment Edited] (CAMEL-14225) Camel route setup over camel-restlet component is returning incorrect content type header i.e "Content-type" instead of "Content-Type"""

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

Rajesh Pote edited comment on CAMEL-14225 at 11/28/19 2:32 PM:
---------------------------------------------------------------

Thanks a lot [~davsclaus] for quick response.

I tried to set header on camel (as you suggested) but no luck. Do we know which class from camel framework is overriding the header key? and is it possible to write our own implementation for same?

I know camel follows the industry standard but our problem here is the other external application which is calling this restlet service is legacy application which works on TCP protocol and cant be changed in production unless it is replaced by some another application.    

 

Much appreciate your help here.

Thanks,

Rajesh Pote 


was (Author: rajesh.pote):
Thanks a lot [~davsclaus] for quick response.

I tried to set header on camel (as you suggested) but no luck. Do we know which class from camel framework is overriding the header key? and is it possible to write our own implementation for same?

I know camel follows the industry standard but our problem here is the other external application which is calling this restlet service is legacy application which works on TCP protocol and cant be changed in production unless it is replaced by some another application.    

 

Much appreciate you help here.

Thanks,

Rajesh Pote 

> Camel route setup over camel-restlet component is returning incorrect content type header i.e "Content-type" instead of "Content-Type"""
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-14225
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14225
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-restlet
>    Affects Versions: 2.23.1
>            Reporter: Rajesh Pote
>            Priority: Minor
>         Attachments: camel-restlet-response.png
>
>
> HI Team,
> We have setup the camel route over camel restlet for processing incoming http request requests but while returning the HTTP Response the http client is getting incorrect header name "Content-type" instead of "Content-Type".
> When we deploy same web service over spring or cxf then we are getting correct header name in HTTP response.
>  
> *Steps to reproduce:*
> 1.Deploy restlet service.
> 2. Call the rest service using http client "SoupUI" or Postman and check the response headers.
>  
> *Response Return by camel-restlet:*
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "Server: Restlet-Framework/2.3.12[\r][\n]"
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "Date: Tue, 26 Nov 2019 12:27:33 GMT[\r][\n]"
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "{color:#ff8b00}Content-type{color}: application/xml[\r][\n]"
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "Content-length: 139[\r][\n]"
> Tue Nov 26 12:27:33 GMT 2019:DEBUG:<< "[\r][\n]"
>  
> *Response Return by spring:*
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "Date: Tue, 26 Nov 2019 12:31:43 GMT[\r][\n]"
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "{color:#00875a}Content-Type{color}: application/xml[\r][\n]"
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "Content-Length: 139[\r][\n]"
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "Server: -[\r][\n]"
> Tue Nov 26 12:31:43 GMT 2019:DEBUG:<< "[\r][\n]"
>  
> We have tried to set correct header name on exchange object but still camel is overriding it.
>  
> Questions:
>  # Is there way to override the content type header name?
>  # Is this known issue in camel? if yes, do we have resolution available in any latest version?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)