mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
AK: Serialize URL hosts with 'concept-host-serializer'
In order to follow spec text to achieve this, we need to change the underlying representation of a host in AK::URL to deserialized format. Before this, we were parsing the host and then immediately serializing it again. Making that change resulted in a whole bunch of fallout. After this change, callers can access the serialized data through this concept-host-serializer. The functional end result of this change is that IPv6 hosts are now correctly serialized to be surrounded with '[' and ']'.
This commit is contained in:
parent
768f070b86
commit
8751be09f9
36 changed files with 175 additions and 143 deletions
|
@ -112,10 +112,10 @@ void ConnectionFromClient::load_url(const URL& url)
|
|||
|
||||
#if defined(AK_OS_SERENITY)
|
||||
DeprecatedString process_name;
|
||||
if (url.host().is_empty())
|
||||
if (url.host().has<Empty>() || url.host() == String {})
|
||||
process_name = "WebContent";
|
||||
else
|
||||
process_name = DeprecatedString::formatted("WebContent: {}", url.host());
|
||||
process_name = DeprecatedString::formatted("WebContent: {}", url.serialized_host().release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
pthread_setname_np(pthread_self(), process_name.characters());
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue