cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [01/10] cxf git commit: [CXF-6768]InternalContextUtils should bak all the data from the input stream before send back partialResponse
Date Wed, 16 Mar 2016 15:05:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 0213838ad -> 0afa9d25d


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

(cherry picked from commit 2726b68fa3dbc8a98018cc957bef47a23c9a950e)

# Conflicts:
#	rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java


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

Branch: refs/heads/3.0.x-fixes
Commit: bbb02cf67e9f1431f3555e5aae3af79a6c9c9487
Parents: 0213838
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Wed Feb 17 12:03:14 2016 +0800
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Mar 16 10:57:40 2016 -0400

----------------------------------------------------------------------
 .../addressing/impl/InternalContextUtils.java   | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bbb02cf6/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 421958e..342850a 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
@@ -269,7 +269,16 @@ final class InternalContextUtils {
                                  new PreexistingConduitSelector(backChannel,
                                                                 exchange.get(Endpoint.class)));
 
-                    if (chain != null && !chain.doIntercept(partialResponse) 
+                    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)
{
                             throw (Fault)partialResponse.getContent(Exception.class);
@@ -294,14 +303,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