mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
Merge pull request #875 from lightpanda-io/async_forward_proxy_to_tls
Some checks failed
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Some checks failed
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Fix async https requests over a http forward proxy
This commit is contained in:
@@ -240,6 +240,10 @@ pub const Client = struct {
|
||||
const proxy_type = self.proxy_type orelse return false;
|
||||
return proxy_type == .forward;
|
||||
}
|
||||
|
||||
fn isProxy(self: *const Client) bool {
|
||||
return self.proxy_type != null;
|
||||
}
|
||||
};
|
||||
|
||||
const RequestOpts = struct {
|
||||
@@ -792,8 +796,12 @@ pub const Request = struct {
|
||||
.conn = .{ .handler = async_handler, .protocol = .{ .plain = {} } },
|
||||
};
|
||||
|
||||
if (self._client.isConnectProxy() and self._proxy_secure) log.warn(.http, "ASYNC TLS CONNECT no impl.", .{});
|
||||
if (self._request_secure) {
|
||||
if (self._client.isConnectProxy() and self._proxy_secure) {
|
||||
log.warn(.http, "not implemented", .{ .feature = "async tls connect" });
|
||||
}
|
||||
|
||||
const is_proxy = self._client.isProxy();
|
||||
if ((is_proxy and self._proxy_secure) or (!self._client.isForwardProxy() and self._request_secure)) {
|
||||
if (self._connection_from_keepalive) {
|
||||
// If the connection came from the keepalive pool, than we already
|
||||
// have a TLS Connection.
|
||||
|
||||
Reference in New Issue
Block a user