1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

AK: Port URL::m_query from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-08-12 19:28:19 +12:00 committed by Andrew Kaster
parent 55a01e72ca
commit 21fe86d235
14 changed files with 63 additions and 75 deletions

View file

@ -32,10 +32,11 @@ DeprecatedString ConnectionInfo::resource_name() const
// The path component
builder.append(path);
// "?" if the query component is non-empty
if (!m_url.query().is_empty())
if (m_url.query().has_value() && !m_url.query()->is_empty()) {
builder.append('?');
// the query component
builder.append(m_url.query());
// the query component
builder.append(*m_url.query());
}
return builder.to_deprecated_string();
}