mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-29 21:57:18 +00:00
LibWeb: Rename __hosthttp- to __host-http- in CookieStore
This commit is contained in:
parent
d126b31b92
commit
2f61199b01
Notes:
github-actions[bot]
2025-08-17 20:18:45 +00:00
Author: https://github.com/IdanHo
Commit: 2f61199b01
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5876
Reviewed-by: https://github.com/gmta ✅
1 changed files with 4 additions and 4 deletions
|
@ -365,15 +365,15 @@ static bool set_a_cookie(PageClient& client, URL::URL const& url, String name, S
|
|||
if (value.is_empty())
|
||||
return false;
|
||||
|
||||
// 3. If value, byte-lowercased, starts with `__host-`, `__hosthttp-`, `__http-`, or `__secure-`, then return failure.
|
||||
// 3. If value, byte-lowercased, starts with `__host-`, `__host-http-`, `__http-`, or `__secure-`, then return failure.
|
||||
auto value_byte_lowercased = value.to_ascii_lowercase();
|
||||
if (value_byte_lowercased.starts_with_bytes("__host-"sv) || value_byte_lowercased.starts_with_bytes("__hosthttp-"sv) || value_byte_lowercased.starts_with_bytes("__http-"sv) || value_byte_lowercased.starts_with_bytes("__secure-"sv))
|
||||
if (value_byte_lowercased.starts_with_bytes("__host-"sv) || value_byte_lowercased.starts_with_bytes("__host-http-"sv) || value_byte_lowercased.starts_with_bytes("__http-"sv) || value_byte_lowercased.starts_with_bytes("__secure-"sv))
|
||||
return false;
|
||||
}
|
||||
|
||||
// 6. If name, byte-lowercased, starts with `__http-` or `__hosthttp-`, then return failure.
|
||||
// 6. If name, byte-lowercased, starts with `__host-http-` or `__http-`, then return failure.
|
||||
auto name_byte_lowercased = name.to_ascii_lowercase();
|
||||
if (name_byte_lowercased.starts_with_bytes("__http-"sv) || name_byte_lowercased.starts_with_bytes("__hosthttp-"sv))
|
||||
if (name_byte_lowercased.starts_with_bytes("__host-http-"sv) || name_byte_lowercased.starts_with_bytes("__http-"sv))
|
||||
return false;
|
||||
|
||||
// 7. Let encodedName be the result of UTF-8 encoding name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue