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

CXF Transport should convert response Date headers to HTTP-friendly format

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • 2.16.0
    • camel-cxf
    • None
    • Patch Available
    • Unknown

    Description

      CXF converts response Date headers into HTTP friendly format in its own transport code.

      When CXF (jaxrs) endpoints are accessed in Camel routes via Camel Transport (example, from Camel Jetty or Camel Servlet) the Date headers are converted in Camel components using the regular toString converters.
      Thus the clients do not receive the expected HTTP-friendly Date representations.

      CxfHeaderHelper should convert such Dates by default. The option is to be introduced to avoid the toString() conversion inside Camel CXF and let other components to do it if really needed.

      Note that the current CXF Transport code is wrongly typed to expect the CXF response headers be already converted to String.

      The patch updates the conversion code to check Dates, disable the conversion to String all together if really needed, and adds more tests

      Attachments

        1. cxfHeaderDateConversion.txt
          11 kB
          Sergey Beryozkin

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sergey_beryozkin Sergey Beryozkin
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: