Skip to content

Commit

Permalink
Merge pull request #4 from escoem/JENKINS-31823
Browse files Browse the repository at this point in the history
[JENKINS-31823] noProxyHost configuration is ignored
  • Loading branch information
stephenc committed Dec 4, 2015
2 parents f2e80df + d8cf150 commit 2b13fa8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.424</version>
<version>1.466</version>
</parent>

<artifactId>async-http-client</artifactId>
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/jenkins/plugins/asynchttpclient/AHCUtils.java
Expand Up @@ -21,8 +21,6 @@

/**
* Utility methods for dealing with {@link com.ning.http.client.AsyncHttpClient} from a Jenkins plugin.
*
* @author Stephen Connolly
*/
public final class AHCUtils {

Expand All @@ -43,6 +41,14 @@ public static ProxyServer getProxyServer() {
if (Jenkins.getInstance() != null && Jenkins.getInstance().proxy != null) {
final ProxyConfiguration proxy = Jenkins.getInstance().proxy;
proxyServer = new ProxyServer(proxy.name, proxy.port, proxy.getUserName(), proxy.getPassword());

if (proxy.noProxyHost != null) {
for (String s : proxy.noProxyHost.split("[ \t\n,|]+")) {
if (s.length() > 0) {
proxyServer.addNonProxyHost(s);
}
}
}
} else {
proxyServer = null;
}
Expand Down

0 comments on commit 2b13fa8

Please sign in to comment.