cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Updating JAXRSInInterceptor to block caching input streams if the chain is aborted with an error Response
Date Tue, 21 Oct 2014 20:44:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 17614b08d -> 80e99fb79


Updating JAXRSInInterceptor to block caching input streams if the chain is aborted with an
error Response


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/80e99fb7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/80e99fb7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/80e99fb7

Branch: refs/heads/2.7.x-fixes
Commit: 80e99fb79e458e9ea738ebfd2d5a5872d48e9e33
Parents: 17614b0
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Oct 21 21:38:12 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Oct 21 21:42:31 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/80e99fb7/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
index 7eb03d9..a82890d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
@@ -348,6 +348,9 @@ public class JAXRSInInterceptor extends AbstractPhaseInterceptor<Message>
{
         mout.setInterceptorChain(
              OutgoingChainInterceptor.getOutInterceptorChain(inMessage.getExchange()));
         inMessage.getExchange().setOutMessage(mout);
+        if (r.getStatus() >= Response.Status.BAD_REQUEST.getStatusCode()) {
+            inMessage.getExchange().put("cxf.io.cacheinput", Boolean.FALSE);
+        }
         return mout;
     }
 }


Mime
View raw message