This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 8a03f1a  Don't swallow I/O exceptions when Manager tries to find a 
session
8a03f1a is described below

commit 8a03f1ad1d173aa09d9c927dc262c2c944258ab0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 29 10:03:59 2020 +0100

    Don't swallow I/O exceptions when Manager tries to find a session
---
 java/org/apache/catalina/connector/LocalStrings.properties | 1 +
 java/org/apache/catalina/connector/Request.java            | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index 1336726..cef1411 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -89,6 +89,7 @@ mapperListener.unregisterWrapper=Unregister Wrapper [{0}] in 
Context [{1}] for c
 request.asyncNotSupported=A filter or servlet of the current chain does not 
support asynchronous operations.
 request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been 
removed
 request.notAsync=It is illegal to call this method if the current request is 
not in asynchronous mode (i.e. isAsyncStarted() returns false)
+request.session.failed=Failed to load session [{0}] due to [{1}]
 
 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 59f91f7..4355f05 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -3156,6 +3156,11 @@ public class Request implements HttpServletRequest {
             try {
                 session = manager.findSession(requestedSessionId);
             } catch (IOException e) {
+                if (log.isDebugEnabled()) {
+                    log.debug(sm.getString("request.session.failed", 
requestedSessionId, e.getMessage()), e);
+                } else {
+                    log.info(sm.getString("request.session.failed", 
requestedSessionId, e.getMessage()));
+                }
                 session = null;
             }
             if ((session != null) && !session.isValid()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to