From b6132f24975027f9c07e3ad4d9b7d0c62552b428 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Mon, 7 Jul 2025 19:56:21 +0800 Subject: [PATCH] fix secure connection logic --- src/http/client.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/http/client.zig b/src/http/client.zig index c3dbb41b..bbdb9876 100644 --- a/src/http/client.zig +++ b/src/http/client.zig @@ -711,7 +711,12 @@ pub const Request = struct { } } } - if (self._request_secure and !self._proxy_secure and !self._client.isForwardProxy()) { + + + if ( + (self._request_secure and !self._proxy_secure) and + (!self._client.isForwardProxy() or self._proxy_secure) + ) { self._connection.?.tls = .{ .blocking = try tls.client(std.net.Stream{ .handle = socket }, tls_config), };