aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http_client_async.zig8
-rw-r--r--src/install/install.zig7
2 files changed, 11 insertions, 4 deletions
diff --git a/src/http_client_async.zig b/src/http_client_async.zig
index b3c06df56..a78358066 100644
--- a/src/http_client_async.zig
+++ b/src/http_client_async.zig
@@ -2289,10 +2289,6 @@ pub fn onWritable(this: *HTTPClient, comptime is_first_call: bool, comptime is_s
};
}
- if (this.verbose) {
- printRequest(request);
- }
-
const headers_len = list.items.len;
std.debug.assert(list.items.len == writer.context.items.len);
if (this.state.request_body.len > 0 and list.capacity - list.items.len > 0 and !this.proxy_tunneling) {
@@ -2327,6 +2323,10 @@ pub fn onWritable(this: *HTTPClient, comptime is_first_call: bool, comptime is_s
this.state.request_sent_len += @as(usize, @intCast(amount));
const has_sent_headers = this.state.request_sent_len >= headers_len;
+ if (has_sent_headers and this.verbose) {
+ printRequest(request);
+ }
+
if (has_sent_headers and this.state.request_body.len > 0) {
this.state.request_body = this.state.request_body[this.state.request_sent_len - headers_len ..];
}
diff --git a/src/install/install.zig b/src/install/install.zig
index 158130b25..c7a2816a5 100644
--- a/src/install/install.zig
+++ b/src/install/install.zig
@@ -358,6 +358,10 @@ const NetworkTask = struct {
);
this.http.client.reject_unauthorized = this.package_manager.tlsRejectUnauthorized();
+ if (PackageManager.verbose_install) {
+ this.http.client.verbose = true;
+ }
+
this.callback = .{
.package_manifest = .{
.name = try strings.StringOrTinyString.initAppendIfNeeded(name, *FileSystem.FilenameStore, &FileSystem.FilenameStore.instance),
@@ -437,6 +441,9 @@ const NetworkTask = struct {
null,
);
this.http.client.reject_unauthorized = this.package_manager.tlsRejectUnauthorized();
+ if (PackageManager.verbose_install) {
+ this.http.client.verbose = true;
+ }
this.callback = .{ .extract = tarball };
}