You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Gintas Grigelionis (JIRA)" <ji...@apache.org> on 2017/08/31 16:28:00 UTC

[jira] [Commented] (IVY-200) HttpClientHandler does not support https.proxyHost

    [ https://issues.apache.org/jira/browse/IVY-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149215#comment-16149215 ] 

Gintas Grigelionis commented on IVY-200:
----------------------------------------

Is this still relevant?

> HttpClientHandler does not support https.proxyHost
> --------------------------------------------------
>
>                 Key: IVY-200
>                 URL: https://issues.apache.org/jira/browse/IVY-200
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3
>            Reporter: Jing Ge
>            Priority: Minor
>
> we use HTTPS for our internal Jars, and when we build the project, the proxy will be set like:
> -Dhttps.proxyHost=XXX  -Dhttps.proxyPort=1234
> but in the private method: 
>     private void configureProxy() {
>         _proxyRealm = null;
>         //no equivalent for realm in jdk proxy support ?
>         _proxyHost = System.getProperty("http.proxyHost");
>         //TODO constant is better ...
>         if(useProxy()) {
>             _proxyPort = Integer.parseInt(System.getProperty("http.proxyPort", "80"));
>             _proxyUserName = System.getProperty("http.proxyUser");
>             _proxyPasswd = System.getProperty("http.proxyPassword");
>             //It seems there is no equivalent in HttpClient for
>             // 'http.nonProxyHosts' property
>             Message.verbose("proxy configured: host="+_proxyHost+" port="+_proxyPort+" user="+_proxyUserName);
>         } else {
>             Message.verbose("no proxy configured");
>         }
>     }
> only the http.proxyHost is got. If we use the SSL, the "https.proxyHost" not the "http.proxyHost" was set, not proxyHost will be found.
> solutions:
> 1. make new method useHTTPSProxy(), true if https proxy is used. Then get the https.proxyHost instead of the http.proxyHost. Or
> 2. patch some code like the following as workaround: 
>         _proxyHost = System.getProperty("http.proxyHost");
>        if (StringUtils.isBlank(_proxyHost)) {
>          _proxyHost = System.getProperty("https.proxyHost");
>       }
> developers, who have the same problem, can solve it without changing the source code, the solution is:
> http.proxyHost must be set just like the https.proxyHost. i.e.
> -Dhttps.proxyHost=XXX  -Dhttps.proxyPort=1234
> -Dhttp.proxyHost=XXX  -Dhttp.proxyPort=1234
> What we use here ist actually the https.proxyHost, but what Ivy gets is the http.proxyHost.  Since they are same, it works fine......



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)