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:40:47 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 43f6a421a -> 8e2af977c


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/8e2af977
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8e2af977
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8e2af977

Branch: refs/heads/3.0.x-fixes
Commit: 8e2af977ca3e2219c3c12a26ffd62a24c27a61d6
Parents: 43f6a42
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:40:26 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/8e2af977/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 6845241..921c44c 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
@@ -271,6 +271,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