cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] git commit: Updating JAXRSInInterceptor to block caching input streams if the chain is aborted with an error Response
Date Tue, 21 Oct 2014 20:39:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 80ea71977 -> 83a241c02


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

Branch: refs/heads/master
Commit: 1d54d41807d98caf7aa4782bba6811d5fe315469
Parents: da9070b
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:38:12 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/1d54d418/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