You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/27 17:34:51 UTC

DO NOT REPLY [Bug 18417] New: - Header should not get set after ContentBuffer is filled up and promptly flushed to client

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18417>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18417

Header should not get set after ContentBuffer is filled up and promptly flushed to client

           Summary: Header should not get set after ContentBuffer is filled
                    up and promptly flushed to client
           Product: Tomcat 5
           Version: 5.0.1
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dianne.jiao@sun.com


Set Header AFTER filling up the Content buffer, the content is flushed to client
once it is filled up, correctly, except header is set:

public void service(HttpServletRequest request, HttpServletResponse response)
                               throws ServletException, IOException
    {
        int size = 40;
        response.setContentLength(size);

        PrintWriter pw = response.getWriter();
        pw.println("Test PASSED");
        StringBuffer tmp= new StringBuffer(2*size);
        int i = 0;

        while ( i < 8) {
             tmp = tmp.append("111111111x");
             i = i+1;
        }
        pw.println(tmp);
        response.addIntHeader("header1", 12345);
    }

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