mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
std.http.Client.connect: case insensitive host comparison
for checking if a proxy is connecting to itself
This commit is contained in:
parent
f9dff2fcf1
commit
ae630b695e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user