File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,10 @@ pub const Client = struct {
240240 const proxy_type = self .proxy_type orelse return false ;
241241 return proxy_type == .forward ;
242242 }
243+
244+ fn isProxy (self : * const Client ) bool {
245+ return self .proxy_type != null ;
246+ }
243247};
244248
245249const RequestOpts = struct {
@@ -792,8 +796,12 @@ pub const Request = struct {
792796 .conn = .{ .handler = async_handler , .protocol = .{ .plain = {} } },
793797 };
794798
795- if (self ._client .isConnectProxy () and self ._proxy_secure ) log .warn (.http , "ASYNC TLS CONNECT no impl." , .{});
796- if (self ._request_secure ) {
799+ if (self ._client .isConnectProxy () and self ._proxy_secure ) {
800+ log .warn (.http , "not implemented" , .{ .feature = "async tls connect" });
801+ }
802+
803+ const is_proxy = self ._client .isProxy ();
804+ if ((is_proxy and self ._proxy_secure ) or (! self ._client .isForwardProxy () and self ._request_secure )) {
797805 if (self ._connection_from_keepalive ) {
798806 // If the connection came from the keepalive pool, than we already
799807 // have a TLS Connection.
You can’t perform that action at this time.
0 commit comments