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:04:42 UTC
[tomcat] branch 9.0.x 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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new bc6b855 Don't swallow I/O exceptions when Manager tries to find a session
bc6b855 is described below
commit bc6b8550b4821382fa7a46b08700a12176d3a92c
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 b4b0f39..98ec857 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 43342d6..42c8346 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2975,6 +2975,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