https://issues.apache.org/bugzilla/show_bug.cgi?id=50748

           Summary: Ignoring setContentLength( ) when using writer is
                    incomplete
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com


Reviewing o.a.c.connector.Response after comments in
https://issues.apache.org/bugzilla/show_bug.cgi?id=50747#c3

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to