You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/07/04 18:48:02 UTC

[1/2] git commit: [CXF-5837] Updating OutgoingChainInterceptor not to eneble the in caching if it is not needed

Repository: cxf
Updated Branches:
  refs/heads/master 805f87717 -> 1fbf53076


[CXF-5837] Updating OutgoingChainInterceptor not to eneble the in caching if it is not needed


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

Branch: refs/heads/master
Commit: f3087f870b4a4001f2778be8e54090343e906935
Parents: 5a9bcf3
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Fri Jul 4 17:47:03 2014 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Fri Jul 4 17:47:03 2014 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/interceptor/OutgoingChainInterceptor.java   | 6 ++++--
 .../main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f3087f87/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
index 88f8b18..c1be1bd 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
@@ -47,7 +47,7 @@ import org.apache.cxf.transport.Conduit;
 
 public class OutgoingChainInterceptor extends AbstractPhaseInterceptor<Message> {
     private static final Logger LOG = LogUtils.getL7dLogger(OutgoingChainInterceptor.class);
-    
+    private static final String CACHE_INPUT_PROPERTY = "cxf.io.cacheinput";
     private PhaseChainCache chainCache = new PhaseChainCache();
     
     public OutgoingChainInterceptor() {
@@ -60,7 +60,9 @@ public class OutgoingChainInterceptor extends AbstractPhaseInterceptor<Message>
         //if we get this far, we're going to be outputting some valid content, but we COULD
         //also be "echoing" some of the content from the input.   Thus, we need to 
         //mark it as requiring the input to be cached.   
-        message.put("cxf.io.cacheinput", Boolean.TRUE);
+        if (message.getExchange().get(CACHE_INPUT_PROPERTY) == null) {
+            message.put(CACHE_INPUT_PROPERTY, Boolean.TRUE);
+        }
         if (null != binding && null != binding.getOperationInfo() && binding.getOperationInfo().isOneWay()) {
             closeInput(message);
             return;

http://git-wip-us.apache.org/repos/asf/cxf/blob/f3087f87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
index fcf95c5..7fd1f1b 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
@@ -75,6 +75,7 @@ public class MessageContextImpl implements MessageContext {
             try {
                 return createAttachments(key.toString());
             } catch (CacheSizeExceededException e) {
+                m.getExchange().put("cxf.io.cacheinput", null);
                 throw new WebApplicationException(413);
             }
         }


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

Posted by se...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: 1fbf530764d2647c9834cde33bb7c4d649a9a41e
Parents: f3087f8 805f877
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Fri Jul 4 17:47:37 2014 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Fri Jul 4 17:47:37 2014 +0100

----------------------------------------------------------------------
 .../search/DefaultParamConverterProvider.java   | 136 +++++++++++++++++++
 .../policy/interceptors/NegotiationUtils.java   |  14 ++
 2 files changed, 150 insertions(+)
----------------------------------------------------------------------