mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
AK: Make URL::m_port an Optional<u16>, Expose raw port getter
Our current way of signalling a missing port with m_port == 0 was lacking, as 0 is a valid port number in URLs.
This commit is contained in:
parent
1c9c43785d
commit
d6cfa34667
Notes:
sideshowbarker
2024-07-18 03:59:28 +09:00
Author: https://github.com/IdanHo
Commit: d6cfa34667
Pull-request: https://github.com/SerenityOS/serenity/pull/10022
15 changed files with 42 additions and 41 deletions
|
@ -108,8 +108,8 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, con
|
|||
dbgln("ResourceLoader: Failed load of: \"{}\", \033[32;1mError: {}\033[0m, Duration: {}ms", url, error_message, load_time_ms);
|
||||
};
|
||||
|
||||
if (is_port_blocked(url.port())) {
|
||||
log_failure(request, String::formatted("The port #{} is blocked", url.port()));
|
||||
if (is_port_blocked(url.port_or_default())) {
|
||||
log_failure(request, String::formatted("The port #{} is blocked", url.port_or_default()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue