Don't add header if already present

This commit is contained in:
Jason van Zyl 2015-04-02 13:56:41 -04:00
parent 46e6c42158
commit a2563b08c6
1 changed files with 2 additions and 2 deletions

View File

@ -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