tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50748] New: Ignoring setContentLength( ) when using writer is incomplete
Date Wed, 09 Feb 2011 21:48:09 GMT
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.kolinko@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message