cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1509862 - /cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
Date Fri, 02 Aug 2013 21:10:27 GMT
Author: sergeyb
Date: Fri Aug  2 21:10:27 2013
New Revision: 1509862

URL: http://svn.apache.org/r1509862
Log:
If requested entity is InputStream do not close it even if auto-close is requested

Modified:
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java?rev=1509862&r1=1509861&r2=1509862&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java Fri
Aug  2 21:10:27 2013
@@ -527,8 +527,9 @@ public abstract class AbstractClient imp
         return null;                                                
     }
     
-    private boolean responseStreamCanBeClosed(Message outMessage, Class<?> cls) {
-        return MessageUtils.isTrue(outMessage.getContextualProperty("response.stream.auto.close"));
+    protected boolean responseStreamCanBeClosed(Message outMessage, Class<?> cls) {
+        return cls != InputStream.class
+            && MessageUtils.isTrue(outMessage.getContextualProperty("response.stream.auto.close"));
     }
     
     protected void completeExchange(Object response, Exchange exchange, boolean proxy) {



Mime
View raw message