billbarker 02/03/18 20:27:50 Modified: coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor.java CoyoteResponse.java Log: Adding support for expectations. This is about the same point in the pipeline that this is done in 4.1. The code for the Response is much the same as that in o.a.c.tomcat4. Revision Changes Path 1.4 +13 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java Index: CoyoteInterceptor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CoyoteInterceptor.java 16 Mar 2002 03:29:42 -0000 1.3 +++ CoyoteInterceptor.java 19 Mar 2002 04:27:50 -0000 1.4 @@ -269,5 +269,18 @@ } return super.getInfo(ctx,request,id,key); } + + /** Handle HTTP expectations. + */ + public int preService(Request request, Response response) { + if(response instanceof CoyoteResponse) { + try { + ((CoyoteResponse)response).sendAcknowledgement(); + } catch(IOException iex) { + log("Can't send ACK",iex); + } + } + return 0; + } } 1.5 +17 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java Index: CoyoteResponse.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CoyoteResponse.java 17 Mar 2002 05:26:20 -0000 1.4 +++ CoyoteResponse.java 19 Mar 2002 04:27:50 -0000 1.5 @@ -133,4 +133,21 @@ super.finish(); coyoteResponse.finish(); } + /** + * Send an acknowledgment of a request. + * + * @exception IOException if an input/output error occurs + */ + public void sendAcknowledgement() + throws IOException { + + // Ignore any call from an included servlet + if (isIncluded()) + return; + if (isBufferCommitted()) + throw new IllegalStateException + (sm.getString("hsrf.error.ise")); + + coyoteResponse.acknowledge(); + } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>