You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/04/30 15:20:02 UTC
[maven-wagon] 01/01: Disable preemptive and scoped auth
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch WAGON-590
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git
commit 508c5c82f3b193c3a7c5887d684677763083ac2b
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Apr 30 17:19:53 2020 +0200
Disable preemptive and scoped auth
---
.../maven/wagon/shared/http/AbstractHttpClientWagon.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
index 1851d9b..1acd9eb 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
@@ -597,7 +597,7 @@ public abstract class AbstractHttpClientWagon
String host = getRepository().getHost();
int port = getRepository().getPort();
- credentialsProvider.setCredentials( getBasicAuthScope().getScope( host, port ), creds );
+ credentialsProvider.setCredentials( AuthScope.ANY, creds );
}
}
@@ -760,14 +760,14 @@ public abstract class AbstractHttpClientWagon
// TODO: is it a good idea, though? 'Expect-continue' handshake would serve much better
Repository repo = getRepository();
- HttpHost targetHost = new HttpHost( repo.getHost(), repo.getPort(), repo.getProtocol() );
+ /*HttpHost targetHost = new HttpHost( repo.getHost(), repo.getPort(), repo.getProtocol() );
AuthScope targetScope = getBasicAuthScope().getScope( targetHost );
if ( credentialsProvider.getCredentials( targetScope ) != null )
{
BasicScheme targetAuth = new BasicScheme();
authCache.put( targetHost, targetAuth );
- }
+ }*/
HttpPut putMethod = new HttpPut( url );
@@ -960,13 +960,13 @@ public abstract class AbstractHttpClientWagon
if ( config != null && config.isUsePreemptive() )
{
HttpHost targetHost = new HttpHost( repo.getHost(), repo.getPort(), repo.getProtocol() );
- AuthScope targetScope = getBasicAuthScope().getScope( targetHost );
+ /*AuthScope targetScope = getBasicAuthScope().getScope( targetHost );
if ( credentialsProvider.getCredentials( targetScope ) != null )
{
BasicScheme targetAuth = new BasicScheme();
authCache.put( targetHost, targetAuth );
- }
+ }*/
}
if ( proxyInfo != null )