Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 13826 invoked from network); 5 Sep 2007 01:54:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 01:54:15 -0000 Received: (qmail 1320 invoked by uid 500); 5 Sep 2007 01:54:06 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 1276 invoked by uid 500); 5 Sep 2007 01:54:05 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 1265 invoked by uid 500); 5 Sep 2007 01:54:05 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 1262 invoked by uid 99); 5 Sep 2007 01:54:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 18:54:05 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 01:54:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8934D1A9832; Tue, 4 Sep 2007 18:53:50 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r572854 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java webapps/docs/changelog.xml Date: Wed, 05 Sep 2007 01:53:50 -0000 To: tomcat-dev@jakarta.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070905015350.8934D1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Sep 4 18:53:49 2007 New Revision: 572854 URL: http://svn.apache.org/viewvc?rev=572854&view=rev Log: An alternative fix for 30949 that does not require additional try/catch/finally blocks Also remove unnecessary unwrapping now that unwrapRequest() and unwrapResponse() are called in invoke() Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?rev=572854&r1=572853&r2=572854&view=diff ============================================================================== --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java Tue Sep 4 18:53:49 2007 @@ -362,10 +362,6 @@ wrequest.setQueryString(hrequest.getQueryString()); processRequest(request,response,state); - - wrequest.recycle(); - unwrapRequest(state); - } // Handle an HTTP path-based forward @@ -401,10 +397,6 @@ } processRequest(request,response,state); - - wrequest.recycle(); - unwrapRequest(state); - } // This is not a real close in order to support error processing @@ -554,8 +546,6 @@ ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, servletPath); invoke(state.outerRequest, state.outerResponse, state); - - wrequest.recycle(); } // Handle an HTTP path based include @@ -592,8 +582,6 @@ ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, servletPath); invoke(state.outerRequest, state.outerResponse, state); - - wrequest.recycle(); } } @@ -768,6 +756,8 @@ // See Bugzilla 30949 unwrapRequest(state); unwrapResponse(state); + // Recycle request if necessary (also BZ 30949) + recycleRequestWrapper(state); // Rethrow an exception if one was thrown by the invoked servlet if (ioException != null) @@ -1024,6 +1014,12 @@ if (!same) { throw new ServletException(sm.getString( "applicationDispatcher.specViolation.response")); + } + } + + private void recycleRequestWrapper(State state) { + if (state.wrapRequest instanceof ApplicationHttpRequest) { + ((ApplicationHttpRequest) state.wrapRequest).recycle(); } } } Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=572854&r1=572853&r2=572854&view=diff ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Sep 4 18:53:49 2007 @@ -34,6 +34,10 @@ + 30949: Improve previous fix. Ensure requests are re-cycled + on cross-context includes and forwards when an exception occurs in the + target page. (markt) + 43216: Set correct StandardSession#accessCount as system property STRICT_SERVLET_COMPLIANCE is true after application restart with SESSION.ser file. Patch provided by Takayuki Kaneko (pero) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org