mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +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
|
|
@ -125,8 +125,8 @@ ErrorOr<Optional<URL::URL>> Response::location_url(Optional<String> const& reque
|
|||
return Optional<URL::URL> {};
|
||||
|
||||
// 2. Let location be the result of extracting header list values given `Location` and response’s header list.
|
||||
auto location_values_or_failure = extract_header_list_values("Location"sv.bytes(), m_header_list);
|
||||
if (location_values_or_failure.has<Infrastructure::ExtractHeaderParseFailure>() || location_values_or_failure.has<Empty>())
|
||||
auto location_values_or_failure = m_header_list->extract_header_list_values("Location"sv.bytes());
|
||||
if (location_values_or_failure.has<Infrastructure::HeaderList::ExtractHeaderParseFailure>() || location_values_or_failure.has<Empty>())
|
||||
return Optional<URL::URL> {};
|
||||
|
||||
auto const& location_values = location_values_or_failure.get<Vector<ByteBuffer>>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue