You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/11/06 10:26:43 UTC

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteOutputStream.java CoyoteResponse.java OutputBuffer.java

remm        2002/11/06 01:26:42

  Modified:    coyote/src/java/org/apache/coyote/tomcat4
                        CoyoteOutputStream.java CoyoteResponse.java
                        OutputBuffer.java
  Log:
  - Port patch.
  - Finish the response when close is called on the stream or writer.
  - This is slightly experimental, and could cause problems. Please test.
  
  Revision  Changes    Path
  1.2       +2 -6      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteOutputStream.java
  
  Index: CoyoteOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteOutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CoyoteOutputStream.java	7 Mar 2002 04:27:23 -0000	1.1
  +++ CoyoteOutputStream.java	6 Nov 2002 09:26:42 -0000	1.2
  @@ -116,17 +116,13 @@
        */
       public void flush()
           throws IOException {
  -        if (ob.flushCharsNeeded())
  -            ob.flushChars();
  -        ob.flushBytes();
  +        ob.flush();
       }
   
   
       public void close()
           throws IOException {
  -        if (ob.flushCharsNeeded())
  -            ob.flushChars();
  -        ob.flushBytes();
  +        ob.close();
       }
   
   
  
  
  
  1.28      +4 -5      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- CoyoteResponse.java	4 Oct 2002 07:03:08 -0000	1.27
  +++ CoyoteResponse.java	6 Nov 2002 09:26:42 -0000	1.28
  @@ -501,7 +501,6 @@
           } catch(Throwable t) {
               t.printStackTrace();
           }
  -        coyoteResponse.finish();
       }
   
   
  
  
  
  1.8       +4 -0      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- OutputBuffer.java	12 Mar 2002 03:48:58 -0000	1.7
  +++ OutputBuffer.java	6 Nov 2002 09:26:42 -0000	1.8
  @@ -301,6 +301,8 @@
       public void close()
           throws IOException {
   
  +        if (closed)
  +            return;
           if (suspended)
               return;
   
  @@ -320,6 +322,8 @@
   
           flush();
           closed = true;
  +
  +        coyoteResponse.finish();
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>