mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02: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:
committed by
Andreas Kling
parent
1c9c43785d
commit
d6cfa34667
Notes:
sideshowbarker
2024-07-18 03:59:28 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/d6cfa34667f Pull-request: https://github.com/SerenityOS/serenity/pull/10022
@@ -42,7 +42,7 @@ void TLSv12WebSocketConnectionImpl::connect(ConnectionInfo const& connection)
|
||||
m_socket->on_tls_certificate_request = [](auto&) {
|
||||
// FIXME : Once we handle TLS certificate requests, handle it here as well.
|
||||
};
|
||||
bool success = m_socket->connect(connection.url().host(), connection.url().port());
|
||||
bool success = m_socket->connect(connection.url().host(), connection.url().port_or_default());
|
||||
if (!success) {
|
||||
deferred_invoke([this] {
|
||||
on_connection_error();
|
||||
|
||||
Reference in New Issue
Block a user