cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject cxf git commit: [CXF-6768]InternalContextUtils should bak all the data from the input stream before send back partialResponse
Date Wed, 17 Feb 2016 04:05:45 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 72547f021 -> afaf1debd


[CXF-6768]InternalContextUtils should bak all the data from the input stream before send back
partialResponse

(cherry picked from commit 2726b68fa3dbc8a98018cc957bef47a23c9a950e)


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

Branch: refs/heads/3.1.x-fixes
Commit: afaf1debd104b7d9850713b866b9f4d58e8dd8d5
Parents: 72547f0
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Wed Feb 17 12:03:14 2016 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Wed Feb 17 12:05:22 2016 +0800

----------------------------------------------------------------------
 .../ws/addressing/impl/InternalContextUtils.java | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/afaf1deb/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
index 2c41925..df06173 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
@@ -268,7 +268,15 @@ final class InternalContextUtils {
                     exchange.put(ConduitSelector.class,
                                  new PreexistingConduitSelector(backChannel,
                                                                 exchange.getEndpoint()));
-
+                    if (ContextUtils.retrieveAsyncPostResponseDispatch(inMessage) &&
!robust) {
+                        //need to suck in all the data from the input stream as
+                        //the transport might discard any data on the stream when this 
+                        //thread unwinds or when the empty response is sent back
+                        DelegatingInputStream in = inMessage.getContent(DelegatingInputStream.class);
+                        if (in != null) {
+                            in.cacheInput();
+                        }
+                    }
                     if (chain != null && !chain.doIntercept(partialResponse) 
                         && partialResponse.getContent(Exception.class) != null) {
                         if (partialResponse.getContent(Exception.class) instanceof Fault)
{
@@ -294,14 +302,7 @@ final class InternalContextUtils {
                          
                     
                     if (ContextUtils.retrieveAsyncPostResponseDispatch(inMessage) &&
!robust) {
-                        //need to suck in all the data from the input stream as
-                        //the transport might discard any data on the stream when this 
-                        //thread unwinds or when the empty response is sent back
-                        DelegatingInputStream in = inMessage.getContent(DelegatingInputStream.class);
-                        if (in != null) {
-                            in.cacheInput();
-                        }
-                        
+                                                
                         // async service invocation required *after* a response
                         // has been sent (i.e. to a oneway, or a partial response
                         // to a decoupled twoway)


Mime
View raw message