tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
Date Wed, 27 Jun 2001 15:55:29 GMT
costin      01/06/27 08:55:29

  Modified:    jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
  Log:
  Few ( temporary ) fixes to keep it working, until the API is finalized.
  ( the most important part is buffer management, we want to reuse
  buffers to keep memory low, but probably we should relax a bit - since
  buffers are recycled anyway, and this is not the biggest factor in our
  memory use )
  
  Revision  Changes    Path
  1.6       +7 -5      jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java
  
  Index: Ajp14Interceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Ajp14Interceptor.java	2001/06/26 19:52:24	1.5
  +++ Ajp14Interceptor.java	2001/06/27 15:55:28	1.6
  @@ -405,14 +405,14 @@
   	if( available <= 0 )
   	    return -1;
   	available--;
  -	return ajp14.doRead();
  +	return ajp14.reqHandler.doRead(ajp14);
       }
       
       public int doRead(byte[] b, int off, int len) throws IOException 
       {
   	if( available <= 0 )
   	    return -1;
  -	int rd=ajp14.doRead( b,off, len );
  +	int rd=ajp14.reqHandler.doRead( ajp14, b,off, len );
   	available -= rd;
   	return rd;
       }
  @@ -445,7 +445,9 @@
               return;
           }
   
  -	ajp14.sendHeaders(getStatus(), getMimeHeaders());
  +	ajp14.reqHandler.sendHeaders(ajp14, ajp14.outBuf, getStatus(),
  +				     HttpMessages.getMessage(status),
  +				     getMimeHeaders());
       } 
   
       // XXX Can be implemented using module notification, no need to extend
  @@ -454,14 +456,14 @@
   	if(!finished) {
   	    super.finish();
   		finished = true; // Avoid END_OF_RESPONSE sent 2 times
  -	    ajp14.finish();
  +	    ajp14.reqHandler.finish(ajp14, ajp14.outBuf);
   	}
       }
   
       // XXX Can be implemented using the buffers, no need to extend
       public void doWrite(  byte b[], int off, int len) throws IOException 
       {
  -	ajp14.doWrite(b, off, len );
  +	ajp14.reqHandler.doWrite(ajp14, ajp14.outBuf, b, off, len );
       }
       
   }
  
  
  

Mime
View raw message