Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 63644 invoked from network); 3 Feb 2001 02:40:42 -0000 Received: from smtp-ft2.fr.colt.net (213.41.78.26) by h31.sny.collab.net with SMTP; 3 Feb 2001 02:40:42 -0000 Received: from www2.cs (access-138.93.rev.fr.colt.net [213.41.93.138]) by smtp-ft2.fr.colt.net with ESMTP id f132fbB12208 for ; Sat, 3 Feb 2001 03:41:37 +0100 Received: from css4.cs (css4.cs [172.31.1.8]) by www2.cs (8.9.3/8.9.3) with ESMTP id DAA19348 for ; Sat, 3 Feb 2001 03:40:49 +0100 Received: by css4.cs with Internet Mail Service (5.5.2650.21) id <1D4HXDVQ>; Sat, 3 Feb 2001 03:40:48 +0100 Message-ID: <361024C34A6DD2118689006097AE2B4DBFE4E7@css4.cs> From: GOMEZ Henri To: tomcat-dev@jakarta.apache.org Subject: RE: [BUG 235] ajp13 and RequestDispatcher.forward() gotcha ! Date: Sat, 3 Feb 2001 03:40:47 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N You could easily reproduce the bugs playing with : This one works http://yourhost:8080/examples/servlet/servletToJsp with mod_jk this one fail (reload X times) http://yourhost/examples/servlet/servletToJsp On ne peut r=E9soudre les probl=E8mes les plus graves avec le m=EAme = esprit qui les a cr=E9es. -- Albert Einstein=20 >-----Original Message----- >From: GOMEZ Henri [mailto:hgomez@slib.fr] >Sent: Saturday, February 03, 2001 3:35 AM >To: tomcat-dev@jakarta.apache.org >Cc: cmanolache@yahoo.com; Dan Milstein; Craig R. McClanahan >Subject: RE: [BUG 235] ajp13 and RequestDispatcher.forward() gotcha ! > > >TC 3.2.1 seems fixed. > >I just take a look at code and saw that the finished =3D true; >is present in=20 >org.apache.tomcat.service.connector.Ajp13ConnectorResponse !-) > > public void finish() throws IOException=20 > { > if (!finished) { > super.finish(); > finished =3D true; > MsgBuffer msg =3D con.getMsgBuffer(); > msg.reset(); > msg.appendByte(JK_AJP13_END_RESPONSE); > msg.appendByte((byte)1); =20 > msg.end(); > con.send(msg); > } > } > =20 >And before the send which may safer, so my code come to =3D> > > public void finish() throws IOException > { > if(!finished) { > finished =3D true; > super.finish(); > ajp13.finish(); > } > } > >On ne peut r=E9soudre les probl=E8mes les plus graves avec le m=EAme=20 >esprit qui >les a cr=E9es. >-- Albert Einstein=20 > >>-----Original Message----- >>From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com] >>Sent: Saturday, February 03, 2001 3:28 AM >>To: tomcat-dev@jakarta.apache.org >>Cc: cmanolache@yahoo.com; Dan Milstein >>Subject: Re: [BUG 235] ajp13 and RequestDispatcher.forward() gotcha ! >> >> >>GOMEZ Henri wrote: >> >>> It's late but I found it. >>> >>> After some ethereal dumps I noticed that the finish method in >>> org.apache.tomcat.modules.server.Ajp13Interceptor is called 2 times >>> when using forward and so we sent 2 time the END_OF_RESPONSE to >>> the Apache Web Server. >>> >>> So Apache (depending on reqs rate and load) will get the 2nd >>> END_OF_RESPONSE just after sending the next request to tomcat. >>> And it will return a NO RESPONSE to browser >>> >> >>I recall a similar bug report (and associated fix for 3.2) some time >>after 3.2b6. You might want to browse back through the CVS=20 >commits for >>November if you want to forward port the fix. >> >>Craig >> >> >>> >>> I think Costin will find quickly where the problem come from >>> (two calls to finish() but a quick hack could be to add >>> finished =3D true in finish() : >>> >>> =3D> >>> >>> public void finish() throws IOException >>> { >>> if(!finished) { >>> super.finish(); >>> ajp13.finish(); >>> finished =3D true; >>> } >>> } >>> <=3D >>> >>> Just think that recycle() reset finished to false ;-( >>> >>>=20 >--------------------------------------------------------------------- >>> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >>> For additional commands, email: tomcat-dev-help@jakarta.apache.org >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >>For additional commands, email: tomcat-dev-help@jakarta.apache.org >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >For additional commands, email: tomcat-dev-help@jakarta.apache.org >