mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Simplify "cannot have a username/password/port"
This is an editorial change in the URL spec, see: https://github.com/whatwg/url/commit/f78785
This commit is contained in:
parent
e5c9d7ce26
commit
e9670862a0
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/e9670862a0 Pull-request: https://github.com/SerenityOS/serenity/pull/21119 Reviewed-by: https://github.com/kemzeb
1 changed files with 1 additions and 2 deletions
|
@ -126,8 +126,7 @@ void URL::append_path(StringView path)
|
||||||
bool URL::cannot_have_a_username_or_password_or_port() const
|
bool URL::cannot_have_a_username_or_password_or_port() const
|
||||||
{
|
{
|
||||||
// A URL cannot have a username/password/port if its host is null or the empty string, or its scheme is "file".
|
// A URL cannot have a username/password/port if its host is null or the empty string, or its scheme is "file".
|
||||||
// FIXME: The spec does not mention anything to do with 'cannot be a base URL'.
|
return m_host.has<Empty>() || m_host == String {} || m_scheme == "file"sv;
|
||||||
return m_host.has<Empty>() || m_host == String {} || m_cannot_be_a_base_url || m_scheme == "file"sv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: This is by no means complete.
|
// FIXME: This is by no means complete.
|
||||||
|
|
Loading…
Reference in a new issue