From a2563b08c64c813c287fe3f51f18c7e0b1207ff9 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 2 Apr 2015 13:56:41 -0400 Subject: [PATCH] Don't add header if already present --- .../apache/maven/repository/legacy/DefaultWagonManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java index 7f91d5391b..2c4a60ec98 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java @@ -243,11 +243,11 @@ public class DefaultWagonManager // See org.eclipse.aether.connector.wagon.WagonRepositoryConnector.connectWagon(Wagon) if( legacySupport.getRepositorySession() != null ) { - String userAgent = ConfigUtils.getString( legacySupport.getRepositorySession(), ConfigurationProperties.USER_AGENT ); + String userAgent = ConfigUtils.getString( legacySupport.getRepositorySession(), null, ConfigurationProperties.USER_AGENT ); if( userAgent == null) { Properties headers = new Properties(); - + headers.put( "User-Agent", ConfigUtils.getString( legacySupport.getRepositorySession(), "Maven", ConfigurationProperties.USER_AGENT ) ); try