Skip to content

Commit

Permalink
[JENKINS-31823] Jenkins version upgraded to 1.452 and noProxyHost add…
Browse files Browse the repository at this point in the history
…ed to ProxyServer builder.
  • Loading branch information
escoem committed Dec 1, 2015
1 parent f2e80df commit 0b53460
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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.452</version>
</parent>

<artifactId>async-http-client</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/jenkins/plugins/asynchttpclient/AHCUtils.java
Expand Up @@ -23,6 +23,7 @@
* Utility methods for dealing with {@link com.ning.http.client.AsyncHttpClient} from a Jenkins plugin.
*
* @author Stephen Connolly
* @author Cloudbees, Inc.
*/
public final class AHCUtils {

Expand All @@ -43,6 +44,13 @@ 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) continue;
proxyServer.addNonProxyHost(s);
}
}
} else {
proxyServer = null;
}
Expand Down

0 comments on commit 0b53460

Please sign in to comment.