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

LoggingOutInterceptor has encoding problem and the solution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.1.3
    • Core
    • None

    Description

      LoggingOutInterceptor use org.apache.cxf.io.CachedOutputStream to write the log.

      in CachedOutputStream public void writeCacheTo(StringBuilder out)

      out.append(((ByteArrayOutputStream)currentStream).toString();

      It use the platform default encoding to write the log!!!!

      in a chinese server, the default encoding is GBK, but the program is UTF-8, the clause should change to

      out.append(((ByteArrayOutputStream)currentStream).toString("UTF-8")

      should LoggingOutInterceptor pass LoggingMessage's encoding message to CachedOutputStream ?

      Attachments

        Activity

          People

            njiang Willem Jiang
            calvinxiu calvin xiu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: