1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibWeb: Make Web::URL::host_is_domain accept an AK::URL::Host

Which allows us to avoid serializing the host only to try and reparse it
again as either an IPv4 or IPv6 address.
This commit is contained in:
Shannon Booth 2023-07-29 10:01:20 +12:00 committed by Andreas Kling
parent 8751be09f9
commit 3cb65645cf
3 changed files with 4 additions and 6 deletions

View file

@ -75,7 +75,7 @@ private:
};
HTML::Origin url_origin(AK::URL const&);
bool host_is_domain(StringView host);
bool host_is_domain(AK::URL::Host const&);
// https://url.spec.whatwg.org/#concept-url-parser
AK::URL parse(StringView input, Optional<AK::URL> const& base_url = {});