Skip to content

Commit

Permalink
Fix Issue 17540 - std.net.curl: HTTP no possibillity to set CURLOPT_N…
Browse files Browse the repository at this point in the history
…OPROXY
  • Loading branch information
RazvanN7 authored and wilzbach committed Jul 6, 2017
1 parent 51c52bb commit e40a356
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions std/net/curl.d
Expand Up @@ -2047,6 +2047,17 @@ private mixin template Protocol()
p.curl.set(CurlOption.localport, cast(long) port);
}

/**
Set the no proxy flag for the specified host names.
Params:
test = a list of comma host names that do not require
proxy to get reached
*/
void setNoProxy(string hosts)
{
p.curl.set(CurlOption.noproxy, hosts);
}

/**
Set the local outgoing port range to use.
This can be used together with the localPort property.
Expand Down Expand Up @@ -2122,6 +2133,9 @@ private mixin template Protocol()
http.onReceive = (ubyte[] data) { return data.length; };
http.setAuthentication("user", "pass");
http.perform();

// Bugzilla 17540
http.setNoProxy("www.example.com");
}

/**
Expand Down

0 comments on commit e40a356

Please sign in to comment.