Author: dkulp
Date: Wed Feb 10 19:22:05 2010
New Revision: 908640
URL: http://svn.apache.org/viewvc?rev=908640&view=rev
Log:
Merged revisions 908638 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r908638 | dkulp | 2010-02-10 14:16:40 -0500 (Wed, 10 Feb 2010) | 1 line
[CXF-2660] GET requests with AutoRedirect turned on fail
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
svn:mergeinfo = /cxf/trunk:908638
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=908640&r1=908639&r2=908640&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Wed Feb 10 19:22:05 2010
@@ -1977,7 +1977,7 @@
super.flush();
if (!cachingForRetransmission) {
super.close();
- } else {
+ } else if (cachedStream != null) {
cachedStream.getOut().close();
cachedStream.closeFlowthroughStream();
}
@@ -2157,7 +2157,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/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=908640&r1=908639&r2=908640&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Wed Feb 10 19:22:05 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