cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1453579 - /cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Date Wed, 06 Mar 2013 21:42:24 GMT
Author: dkulp
Date: Wed Mar  6 21:42:24 2013
New Revision: 1453579

URL: http://svn.apache.org/r1453579
Log:
[CXF-4858] Copy the cookies when we allow HC to handle the retransmits

Modified:
    cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java

Modified: cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1453579&r1=1453578&r2=1453579&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Wed Mar  6 21:42:24 2013
@@ -706,6 +706,24 @@ public class AsyncHTTPConduit extends UR
             cookies.readFromHeaders(h);
         }
         
+        protected boolean authorizationRetransmit() throws IOException {
+            boolean b = super.authorizationRetransmit();
+            if (!b) {
+                //HTTPClient may be handling the authorization things instead of us, we
+                //just need to make sure we set the cookies and proceed and HC 
+                //will do the negotiation and such.
+                try {
+                    closeInputStream();
+                } catch (Throwable t) {
+                    //ignore
+                }
+                cookies.writeToMessageHeaders(outMessage);
+                retransmit(url.toString());
+                return true;
+            }
+            return b;
+        }        
+        
         protected void retransmitStream() throws IOException {
             cachingForRetransmission = false; //already cached
             setupWrappedStream();



Mime
View raw message