deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject deltaspike git commit: DELTASPIKE-950 RequestResponseHolderListener fails if requestInitialized() is called more than once
Date Tue, 14 Jul 2015 04:43:42 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 65580df92 -> 9d0ad6b6b


DELTASPIKE-950 RequestResponseHolderListener fails if requestInitialized() is called more
than once


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/9d0ad6b6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/9d0ad6b6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/9d0ad6b6

Branch: refs/heads/master
Commit: 9d0ad6b6b7d2109ffee1a9577f87a44bcc91a535
Parents: 65580df
Author: Christian Kaltepoth <chkal@apache.org>
Authored: Tue Jul 14 06:42:51 2015 +0200
Committer: Christian Kaltepoth <chkal@apache.org>
Committed: Tue Jul 14 06:42:51 2015 +0200

----------------------------------------------------------------------
 .../servlet/impl/produce/RequestResponseHolderListener.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/9d0ad6b6/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/RequestResponseHolderListener.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/RequestResponseHolderListener.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/RequestResponseHolderListener.java
index 70296be..15a7665 100644
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/RequestResponseHolderListener.java
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/RequestResponseHolderListener.java
@@ -42,7 +42,14 @@ public class RequestResponseHolderListener implements ServletRequestListener,
De
     {
         if (activated)
         {
-            RequestResponseHolder.REQUEST.bind(sre.getServletRequest());
+            /*
+             * For some reason Tomcat seems to call requestInitialized() more than
+             * once for a request. Not sure if this allowed according to the spec.
+             */
+            if (!RequestResponseHolder.REQUEST.isBound())
+            {
+                RequestResponseHolder.REQUEST.bind(sre.getServletRequest());
+            }
         }
     }
 


Mime
View raw message