cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r908638 - in /cxf/trunk: rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Date Wed, 10 Feb 2010 19:16:55 GMT
Author: dkulp
Date: Wed Feb 10 19:16:40 2010
New Revision: 908638

URL: http://svn.apache.org/viewvc?rev=908638&view=rev
Log:
[CXF-2660] GET requests with AutoRedirect turned on fail

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=908638&r1=908637&r2=908638&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Wed Feb 10 19:16:40 2010
@@ -1979,7 +1979,7 @@
             super.flush();
             if (!cachingForRetransmission) {
                 super.close();
-            } else {
+            } else if (cachedStream != null) {
                 cachedStream.getOut().close();
                 cachedStream.closeFlowthroughStream();
             }
@@ -2159,7 +2159,7 @@
                 //not going to be resending or anything, clear out the stuff in the out message
                 //to free memory
                 outMessage.removeContent(OutputStream.class);
-                if (cachingForRetransmission) {
+                if (cachingForRetransmission && cachedStream != null) {
                     cachedStream.close();
                 }
                 cachedStream = null;

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=908638&r1=908637&r2=908638&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Wed Feb 10 19:16:40 2010
@@ -161,6 +161,11 @@
         
         HTTPConduit conduit2 = (HTTPConduit)WebClient.getConfig(proxy).getConduit();
         assertSame(conduit, conduit2);
+        
+        conduit.getClient().setAutoRedirect(true);
+        b = proxy.getBook(new Long("123"));
+        assertEquals(123, b.getId());
+        assertEquals("CXF in Action", b.getName());
     }
     
     @Test



Mime
View raw message