Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1229

byte count for tomcat is wrong when transfer encoding is chunked

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 1.5.12
    • None
    • logback-access
    • None

    Description

      When using logback access in tomcat and the transfer encoding is chunked, logback appends "-" as byte count field.

      This is because method response.getContentLength() is used. Instead response.getBytesWritten(false); should be used.

      Reference implementation from tomcat's Valve:
      https://github.com/apache/tomcat/blob/1ca4a95822197bbad8c6faaa7616af9137fdf50a/java/org/apache/catalina/valves/AbstractAccessLogValve.java#L1165

      Attachments

        Activity

          People

            logback-dev Logback dev list
            ckoutsouridis Charis Koutsouridis
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: