tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50748] New: Ignoring setContentLength( ) when using writer is incomplete
Date Wed, 09 Feb 2011 21:48:09 GMT

           Summary: Ignoring setContentLength( ) when using writer is
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina

Reviewing o.a.c.connector.Response after comments in

In o.a.c.connector.Response there is a feature that
Response#setContentLength(int) ignores the call if usingWriter flag is true.

My comments are:

1) It concerns only multi-byte charsets such as UTF-8. There is nothing wrong
with calling setContentLength() if it is a single-byte charset.

2) There is no such protection in Response#setHeader(), #setIntHeader(),
#addHeader(), #addIntHeader() methods. Calling them will bypass the protection.

See how o.a.coyote.Response implements those methods and
o.a.coyote.Response#checkSpecialHeader() for comparison.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message