You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/04/29 09:03:42 UTC

[tomcat] branch master updated: Don't swallow I/O exceptions when Manager tries to find a session

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

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


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

commit e9bbb5b1708e59c0388b125b87a9d710366547a9
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 ef7d28f..11aaf22 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -83,6 +83,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 84549d0..a40fc3f 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2943,6 +2943,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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org