mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Organize Fetch Headers.h/Headers.cpp a bit
Generally just define things in the order they are declared (will make a change to use ByteString in this file a bit easier to follow). Also make a couple of free functions be class methods on Header / HeaderList.
This commit is contained in:
parent
556364fd76
commit
d70224ad2e
Notes:
github-actions[bot]
2025-11-26 14:16:37 +00:00
Author: https://github.com/trflynn89
Commit: d70224ad2e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6933
7 changed files with 372 additions and 386 deletions
|
|
@ -22,7 +22,7 @@ namespace Web::ReferrerPolicy {
|
|||
ReferrerPolicy parse_a_referrer_policy_from_a_referrer_policy_header(Fetch::Infrastructure::Response const& response)
|
||||
{
|
||||
// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.
|
||||
auto policy_tokens_or_failure = Fetch::Infrastructure::extract_header_list_values("Referrer-Policy"sv.bytes(), response.header_list());
|
||||
auto policy_tokens_or_failure = response.header_list()->extract_header_list_values("Referrer-Policy"sv.bytes());
|
||||
auto policy_tokens = policy_tokens_or_failure.has<Vector<ByteBuffer>>() ? policy_tokens_or_failure.get<Vector<ByteBuffer>>() : Vector<ByteBuffer> {};
|
||||
|
||||
// 2. Let policy be the empty string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue