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

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


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

commit 103347f097c46f6bcba1563580c2cf373594c130
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 364fd66..eea0161 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -82,6 +82,7 @@ request.asyncNotSupported=A filter or servlet of the current 
chain does not supp
 request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been 
removed
 request.illegalWrap=The request wrapper must wrap the request obtained from 
getRequest()
 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 2d13f82..8180aa9 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -3014,6 +3014,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