Rajesh Pote created CAMEL-14225:
-----------------------------------
Summary: 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
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)