Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14225

Camel route setup over camel-restlet component is returning incorrect content type header i.e "Content-type" instead of "Content-Type"""

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.23.1
    • Fix Version/s: None
    • Component/s: camel-core, camel-restlet
    • Labels:
      None

      Description

      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:<< "Content-type: 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:<< "Content-Type: 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:

      1. Is there way to override the content type header name?
      2. Is this known issue in camel? if yes, do we have resolution available in any latest version?

       

        Attachments

        1. camel-restlet-response.png
          23 kB
          Rajesh Pote

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rajesh.pote Rajesh Pote
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: