cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1453581 - /cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Date Wed, 06 Mar 2013 21:46:51 GMT
Author: dkulp
Date: Wed Mar  6 21:46:51 2013
New Revision: 1453581

URL: http://svn.apache.org/r1453581
Log:
Merged revisions 1453579 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1453579 | dkulp | 2013-03-06 16:42:24 -0500 (Wed, 06 Mar 2013) | 2 lines

  [CXF-4858] Copy the cookies when we allow HC to handle the retransmits

........

Modified:
    cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java

Modified: cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1453581&r1=1453580&r2=1453581&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Wed Mar  6 21:46:51 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