zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit ae630b695e1306ae357a900a44732912eac2a417 (tree)
parent f9dff2fcf1d5c6df1d6b935c4eb536793148a9d9
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Fri, 16 Feb 2024 19:10:45 -0700

std.http.Client.connect: case insensitive host comparison

for checking if a proxy is connecting to itself

Diffstat:
Mlib/std/http/Client.zig | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig @@ -1412,7 +1412,9 @@ pub fn connect( } orelse return client.connectTcp(host, port, protocol); // Prevent proxying through itself. - if (std.mem.eql(u8, proxy.host, host) and proxy.port == port and proxy.protocol == protocol) { + if (std.ascii.eqlIgnoreCase(proxy.host, host) and + proxy.port == port and proxy.protocol == protocol) + { return client.connectTcp(host, port, protocol); }