Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8234

Response Content-Type is missing 'charset' when Transformation feature is enabled

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.6, 3.2.12
    • Fix Version/s: 3.3.6, 3.2.13
    • Component/s: JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      We have a JAXWS based service and we enabled the transformation feature based on https://cxf.apache.org/docs/transformationfeature.html, but then we noticed that 'charset' is missing in response Content-Type.  This is probably due to "disable.outputstream.optimization" being set to true by TransformOutInterceptor but the documentation states that "disable.outputstream.optimization" needs to be set to true prior to CXF versions 3.2.6 and 3.1.17.

      We are using 3.2.6 and we even upgraded to 3.2.12 and the behavior is the same.  I also checked TransformOutInterceptor in master branch and it is still setting "disable.outputstream.optimization" to true.

      Is there a workaround for this issue in 3.2.x branch and can this be fixed in future releases?

       

      Here are part of the headers with transformation:

      HTTP/1.1 200 
      Content-Type: text/xml
      Transfer-Encoding: chunked
      Date: Sun, 08 Mar 2020 22:41:04 GMT

       

      And here are part of the headers when transformation is not used:

      HTTP/1.1 200 
      Content-Type: text/xml;charset=UTF-8
      Transfer-Encoding: chunked
      Date: Sun, 08 Mar 2020 22:40:43 GMT
      

       

       

        Attachments

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              edga Edwin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: