You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by to...@apache.org on 2014/10/08 15:10:18 UTC

svn commit: r1630095 - /sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java

Author: tommaso
Date: Wed Oct  8 13:10:18 2014
New Revision: 1630095

URL: http://svn.apache.org/r1630095
Log:
SLING-4015 - applied patch from Laurie for preemptive auth for transport

Modified:
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java?rev=1630095&r1=1630094&r2=1630095&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java (original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/transport/authentication/impl/UserCredentialsTransportAuthenticationProvider.java Wed Oct  8 13:10:18 2014
@@ -71,8 +71,9 @@ public class UserCredentialsTransportAut
         if (authenticable instanceof Executor) {
             Executor executor = (Executor) authenticable;
 
-            Executor authenticated = executor.auth(new HttpHost(endpoint.getUri().getHost()),
-                    username, password);
+            Executor authenticated = executor.auth(new HttpHost(endpoint.getUri().getHost(), endpoint.getUri().getPort()),
+                    username, password).authPreemptive(
+                        new HttpHost(endpoint.getUri().getHost(), endpoint.getUri().getPort()));
             log.debug("authenticated executor HTTP client with user and password");
             return authenticated;