tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <>
Subject Recycle Logic in 3.2.1 broken
Date Wed, 16 May 2001 16:34:20 GMT


I have detected what seems to be a bug in the recycle logic
of TomCat 3.2.1. What seems to be happening is, that a
response object of some kind is using a Writer and processes
the request. In some other request the BufferedServletOutputStream's
"usingWriter" flag is still set, in other words, the recycling
doesn't seem to work properly.

I can demonstrate the problem and create a workaround by
adding the following code on top of my servlet. It uses
a method isUsingWriter(), which I have added to the
BufferedServletOutputStream class:

    ServletOutputStream os = pRes.getOutputStream();
    if (os instanceof org.apache.tomcat.core.BufferedServletOutputStream) {
      org.apache.tomcat.core.BufferedServletOutputStream bsos =
        (org.apache.tomcat.core.BufferedServletOutputStream) os;
      if (bsos.isUsingWriter()) {
        Trace.Log(this, "tmGet", 5, "OutputStream is using Writer");

View raw message