maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r485094 - /maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
Date Sun, 10 Dec 2006 00:02:51 GMT
Author: joakime
Date: Sat Dec  9 16:02:48 2006
New Revision: 485094

URL: http://svn.apache.org/viewvc?view=rev&rev=485094
Log:
[WAGONHTTP-6] Adding support for JDK 1.4+ https proxying built into JRE.
Submitted By: Thomas Recloux


Modified:
    maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java?view=diff&rev=485094&r1=485093&r2=485094
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
Sat Dec  9 16:02:48 2006
@@ -50,9 +50,13 @@
 {
     private String previousProxyExclusions;
 
-    private String previousProxyHost;
+    private String previousHttpProxyHost;
 
-    private String previousProxyPort;
+    private String previousHttpsProxyHost;
+
+    private String previousHttpProxyPort;
+    
+    private String previousHttpsProxyPort;
 
     private HttpURLConnection putConnection;
 
@@ -181,15 +185,20 @@
     public void openConnection()
         throws ConnectionException, AuthenticationException
     {
-        previousProxyHost = System.getProperty( "http.proxyHost" );
-        previousProxyPort = System.getProperty( "http.proxyPort" );
+
+        previousHttpProxyHost = System.getProperty( "http.proxyHost" );
+        previousHttpProxyPort = System.getProperty( "http.proxyPort" );
+        previousHttpsProxyHost = System.getProperty( "https.proxyHost" );
+        previousHttpsProxyPort = System.getProperty( "https.proxyPort" );        
         previousProxyExclusions = System.getProperty( "http.nonProxyHosts" );
 
         final ProxyInfo proxyInfo = this.proxyInfo;
         if ( proxyInfo != null )
         {
             System.setProperty( "http.proxyHost", proxyInfo.getHost() );
+            System.setProperty( "https.proxyHost", proxyInfo.getHost() );
             System.setProperty( "http.proxyPort", String.valueOf( proxyInfo.getPort() ) );
+            System.setProperty( "https.proxyPort", String.valueOf( proxyInfo.getPort() )
);
             if ( proxyInfo.getNonProxyHosts() != null )
             {
                 System.setProperty( "http.nonProxyHosts", proxyInfo.getNonProxyHosts() );
@@ -239,13 +248,21 @@
         {
             putConnection.disconnect();
         }
-        if ( previousProxyHost != null )
+        if ( previousHttpProxyHost != null )
+        {
+            System.setProperty( "http.proxyHost", previousHttpProxyHost );
+        }
+        if ( previousHttpsProxyHost != null )
+        {
+            System.setProperty( "https.proxyHost", previousHttpsProxyHost );
+        }
+        if ( previousHttpProxyPort != null )
         {
-            System.setProperty( "http.proxyHost", previousProxyHost );
+            System.setProperty( "http.proxyPort", previousHttpProxyPort );
         }
-        if ( previousProxyPort != null )
+        if ( previousHttpsProxyPort != null )
         {
-            System.setProperty( "http.proxyPort", previousProxyPort );
+            System.setProperty( "https.proxyPort", previousHttpsProxyPort );
         }
         if ( previousProxyExclusions != null )
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message