cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1068173 - /cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
Date Mon, 07 Feb 2011 22:12:14 GMT
Author: dkulp
Date: Mon Feb  7 22:12:14 2011
New Revision: 1068173

URL: http://svn.apache.org/viewvc?rev=1068173&view=rev
Log:
[CXF-3253] Make sure local conduit uses the correct output stream to
launch the destination.

Modified:
    cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java

Modified: cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java?rev=1068173&r1=1068172&r2=1068173&view=diff
==============================================================================
--- cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
(original)
+++ cxf/trunk/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
Mon Feb  7 22:12:14 2011
@@ -61,6 +61,8 @@ public class LocalConduit extends Abstra
             // prepare the stream here
             CachedOutputStream stream = new CachedOutputStream();
             message.setContent(OutputStream.class, stream);
+            //save the original stream
+            message.put(CachedOutputStream.class, stream);
         }
     }
 
@@ -87,7 +89,10 @@ public class LocalConduit extends Abstra
         transportFactory.copy(message, copy);
         MessageImpl.copyContent(message, copy);
         
-        CachedOutputStream stream = (CachedOutputStream)message.getContent(OutputStream.class);
+        OutputStream out = message.getContent(OutputStream.class);
+        out.flush();
+        
+        CachedOutputStream stream = message.get(CachedOutputStream.class);
         copy.setContent(InputStream.class, stream.getInputStream());
 
         // Create a new incoming exchange and store the original exchange for the response



Mime
View raw message