mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
cookie: ignore case when comparing with localhost domain
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
This commit is contained in:
@@ -358,7 +358,7 @@ pub const Cookie = struct {
|
||||
value = value[1..];
|
||||
}
|
||||
|
||||
if (std.mem.indexOfScalarPos(u8, value, 0, '.') == null and std.mem.eql(u8, "localhost", value) == false) {
|
||||
if (std.mem.indexOfScalarPos(u8, value, 0, '.') == null and std.ascii.eqlIgnoreCase("localhost", value) == false) {
|
||||
// can't set a cookie for a TLD
|
||||
return error.InvalidDomain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user