What happened: when moving to uSockets for the http client, I forgot to call `SSL_set_tlsext_host_name` and uSockets apparently doesn't do that
This commit is contained in:
Jarred Sumner
2022-10-08 01:05:19 -07:00
parent 99e7856269
commit c2c9173eff
9 changed files with 110 additions and 1345 deletions

View File

@@ -3698,3 +3698,14 @@ test "eqlCaseInsensitiveASCII" {
try std.testing.expect(!eqlCaseInsensitiveASCII("aBcD", "NOOO", true));
try std.testing.expect(!eqlCaseInsensitiveASCII("aBcD", "LENGTH CHECK", true));
}
pub fn isIPAddress(input: []const u8) bool {
if (containsChar(input, ':'))
return true;
if (std.x.os.IPv4.parse(input)) |_| {
return true;
} else |_| {
return false;
}
}