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

User generated headers in http responses are not logged

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.2.9, 3.4.0
    • None
    • logging
    • None
    • Unknown

    Description

      If an HTTP Servlet adds headers by using httpServletResponse.addHeader or httpServletResponse.setHeader these headers are not logged by the LoggingOutInterceptor.

       

      This is because DefaultLogEventMapper::getHeaders only logs headers from the message's "Message.PROTOCOL_HEADERS" field rather than the headers from the HttpServletResponse in the Message's "HTTP.RESPONSE" field.

      As far as I can tell the "Message.PROTOCOL_HEADERS" are merged into the response's headers by Headers::copyToResponse.

      So If the Message has an "HTTP.RESPONSE" field it should be safe to only log the headers from that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fbieler Fabian Bieler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: