mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
github-actions[bot]
2025-11-26 14:16:37 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d70224ad2e9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6933
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user