mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.http: use loadDefaultProxies in compiler
This commit is contained in:
parent
0eef21d8ec
commit
e11a839760
2 changed files with 5 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ pub const options = struct {
|
||||||
|
|
||||||
/// By default, std.http.Client will support HTTPS connections. Set this option to `true` to
|
/// By default, std.http.Client will support HTTPS connections. Set this option to `true` to
|
||||||
/// disable TLS support.
|
/// disable TLS support.
|
||||||
///
|
///
|
||||||
/// This will likely reduce the size of the binary, but it will also make it impossible to
|
/// This will likely reduce the size of the binary, but it will also make it impossible to
|
||||||
/// make a HTTPS connection.
|
/// make a HTTPS connection.
|
||||||
pub const http_disable_tls = if (@hasDecl(options_override, "http_disable_tls"))
|
pub const http_disable_tls = if (@hasDecl(options_override, "http_disable_tls"))
|
||||||
|
|
|
||||||
|
|
@ -5128,6 +5128,8 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
|
||||||
var http_client: std.http.Client = .{ .allocator = gpa };
|
var http_client: std.http.Client = .{ .allocator = gpa };
|
||||||
defer http_client.deinit();
|
defer http_client.deinit();
|
||||||
|
|
||||||
|
try http_client.loadDefaultProxies();
|
||||||
|
|
||||||
var progress: std.Progress = .{ .dont_print_on_dumb = true };
|
var progress: std.Progress = .{ .dont_print_on_dumb = true };
|
||||||
const root_prog_node = progress.start("Fetch Packages", 0);
|
const root_prog_node = progress.start("Fetch Packages", 0);
|
||||||
defer root_prog_node.end();
|
defer root_prog_node.end();
|
||||||
|
|
@ -7039,6 +7041,8 @@ fn cmdFetch(
|
||||||
var http_client: std.http.Client = .{ .allocator = gpa };
|
var http_client: std.http.Client = .{ .allocator = gpa };
|
||||||
defer http_client.deinit();
|
defer http_client.deinit();
|
||||||
|
|
||||||
|
try http_client.loadDefaultProxies();
|
||||||
|
|
||||||
var progress: std.Progress = .{ .dont_print_on_dumb = true };
|
var progress: std.Progress = .{ .dont_print_on_dumb = true };
|
||||||
const root_prog_node = progress.start("Fetch", 0);
|
const root_prog_node = progress.start("Fetch", 0);
|
||||||
defer root_prog_node.end();
|
defer root_prog_node.end();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue