cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1345257 - in /cxf/branches/2.4.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/ rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/ systests/transports/src/test/java/org/apache/cxf/systest/http_j...
Date Fri, 01 Jun 2012 15:52:08 GMT
Author: dkulp
Date: Fri Jun  1 15:52:08 2012
New Revision: 1345257

URL: http://svn.apache.org/viewvc?rev=1345257&view=rev
Log:
Merged revisions 1345249 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1345249 | dkulp | 2012-06-01 11:42:56 -0400 (Fri, 01 Jun 2012) | 10 lines
  
  Merged revisions 1344889 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1344889 | dkulp | 2012-05-31 16:17:38 -0400 (Thu, 31 May 2012) | 3 lines
  
    [CXF-4353] Don't use the auth stuff for the proxy-auth
    Consume the intput stream so a single connection can be used.
  
  ........
........

Added:
    cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyDigestAuthTest.java
      - copied unchanged from r1345249, cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyDigestAuthTest.java
    cxf/branches/2.4.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyDigestServer.xml
      - copied unchanged from r1345249, cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyDigestServer.xml
Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java

Propchange: cxf/branches/2.4.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1345257&r1=1345256&r2=1345257&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Fri Jun  1 15:52:08 2012
@@ -1067,9 +1067,21 @@ public class HTTPConduit 
             // authentication not possible => we give up
             return connection;
         }
+        try {
+            //try and consume any content so that the connection might be reusable
+            InputStream ins = connection.getErrorStream();
+            if (ins == null) {
+                ins = connection.getInputStream();
+            }
+            if (ins != null) {
+                IOUtils.consume(ins);
+                ins.close();
+            }
+        } catch (Throwable t) {
+            //ignore
+        }
         new Headers(message).setAuthorization(authorizationToken);
         cookies.writeToMessageHeaders(message);
-        connection.disconnect();
         return retransmit(currentURL, message, cachedStream);
     }
 

Modified: cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java?rev=1345257&r1=1345256&r2=1345257&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
Fri Jun  1 15:52:08 2012
@@ -60,10 +60,13 @@ public class DigestAuthSupplier implemen
         return true;
     }
 
-    public String getAuthorization(AuthorizationPolicy  authPolicy,
+    public String getAuthorization(AuthorizationPolicy authPolicy,
                                    URL currentURL,
                                    Message message,
                                    String fullHeader) {
+        if (authPolicy.getUserName() == null && authPolicy.getPassword() == null)
{
+            return null;
+        }
         if (fullHeader == null) {
             DigestInfo di = authInfo.get(currentURL);
             if (di != null) {



Mime
View raw message