From: markt Date: Thu, 20 Jan 2011 18:34:18 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50620 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1d3eb5a9974e8061a3f9194e9ab7eb454da11573;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50620 Exceptions calling session.endAccess should not prevent recycle() from completing normally git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1061442 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/connector/LocalStrings.properties b/java/org/apache/catalina/connector/LocalStrings.properties index a237bc4ff..1c48aef95 100644 --- a/java/org/apache/catalina/connector/LocalStrings.properties +++ b/java/org/apache/catalina/connector/LocalStrings.properties @@ -64,6 +64,7 @@ coyoteRequest.alreadyAuthenticated=This is request has already been authenticate coyoteRequest.noLoginConfig=No authentication mechanism has been configured for this context coyoteRequest.authenticate.ise=Cannot call authenticate() after the reponse has been committed coyoteRequest.uploadLocationInvalid=The temporary upload location [{0}] is not valid +coyoteRequest.sessionEndAccessFail=Exception triggered ending access to session while recycling request requestFacade.nullRequest=The request object has been recycled and is no longer associated with this facade diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 66ca28c52..f77a24b98 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -75,6 +75,8 @@ import org.apache.catalina.util.Enumerator; import org.apache.catalina.util.ParameterMap; import org.apache.catalina.util.StringParser; import org.apache.coyote.ActionCode; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.buf.B2CConverter; import org.apache.tomcat.util.buf.ByteChunk; @@ -105,7 +107,8 @@ import org.apache.tomcat.util.res.StringManager; public class Request implements HttpServletRequest { - + private static final Log log = LogFactory.getLog(Connector.class); + // ----------------------------------------------------------- Constructors @@ -492,7 +495,12 @@ public class Request cookies = null; if (session != null) { - session.endAccess(); + try { + session.endAccess(); + } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); + log.warn(sm.getString("coyoteRequest.sessionEndAccessFail"), t); + } } session = null; requestedSessionCookie = false;