You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/06/19 20:21:24 UTC

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

costin      2002/06/19 11:21:24

  Modified:    coyote   build.xml
               coyote/src/java/org/apache/coyote/tomcat3
                        Tomcat3Request.java
               coyote/src/java/org/apache/coyote/tomcat4
                        CoyoteResponse.java
  Log:
  Few extra checkings.
  
  Revision  Changes    Path
  1.9       +7 -6      jakarta-tomcat-connectors/coyote/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml	15 Apr 2002 10:45:12 -0000	1.8
  +++ build.xml	19 Jun 2002 18:21:24 -0000	1.9
  @@ -186,6 +186,7 @@
         <fileset dir="${source.home}" excludes="**/*.java"/>
       </copy>
     </target>
  +
     <target name="compile.tomcat33" if="tomcat33.detect"
      description="Compile Tomcat 3.3.x Adapter">
       <javac  srcdir="${source.home}"
  @@ -199,6 +200,11 @@
       <copy    todir="${build.home}/classes" filtering="on">
         <fileset dir="${source.home}" excludes="**/*.java"/>
       </copy>
  +    <jar    jarfile="${build.home}/lib/tomcat33-${component.name}.jar"
  +            basedir="${build.home}/classes"
  +           manifest="${build.home}/conf/MANIFEST.MF"
  +           includes="org/apache/coyote/**" 
  +	   excludes="**/tomcat4/*" />
     </target>
   
     <target name="compile" 
  @@ -209,11 +215,6 @@
              manifest="${build.home}/conf/MANIFEST.MF"
              includes="org/apache/coyote/**" 
   	   excludes="**/tomcat3/*" />
  -    <jar    jarfile="${build.home}/lib/tomcat33-${component.name}.jar"
  -            basedir="${build.home}/classes"
  -           manifest="${build.home}/conf/MANIFEST.MF"
  -           includes="org/apache/coyote/**" 
  -	   excludes="**/tomcat4/*" />
     </target>
   
     <target name="compile.tests" depends="compile"
  
  
  
  1.10      +4 -2      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java
  
  Index: Tomcat3Request.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Tomcat3Request.java	9 Apr 2002 20:14:11 -0000	1.9
  +++ Tomcat3Request.java	19 Jun 2002 18:21:24 -0000	1.10
  @@ -90,7 +90,7 @@
       // info from the protocol handler.
       //    SSLSupport sslSupport=null;
   
  -    ByteChunk  readChunk = new ByteChunk();
  +    ByteChunk  readChunk = new ByteChunk(8096);
       int  pos=-1;
       int  end=-1;
       byte [] readBuffer = null;
  @@ -170,7 +170,7 @@
   	    return -1;
   	// if available == -1: unknown length, we'll read until end of stream.
   	if(pos >= end) {
  -	    if(readBytes() < 0) 
  +	    if(readBytes() <= 0) 
   		return -1;
   	}
   	int rd = -1;
  @@ -199,6 +199,8 @@
               readBuffer = readChunk.getBytes();
               end = readChunk.getEnd();
               pos = readChunk.getStart();
  +        } else if( result < 0 ) {
  +            throw new IOException( "Read bytes failed " + result );
           }
           return result;
   
  
  
  
  1.17      +9 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CoyoteResponse.java	22 May 2002 01:15:18 -0000	1.16
  +++ CoyoteResponse.java	19 Jun 2002 18:21:24 -0000	1.17
  @@ -493,7 +493,11 @@
       public void finishResponse() 
           throws IOException {
           // Writing leftover bytes
  -        outputBuffer.close();
  +        try {
  +            outputBuffer.close();
  +        } catch( Throwable t ) {
  +	    t.printStackTrace();
  +        }
           coyoteResponse.finish();
       }
   
  
  
  

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