mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00: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
|
@ -46,7 +46,7 @@ void HttpsJob::start()
|
|||
if (on_certificate_requested)
|
||||
on_certificate_requested(*this);
|
||||
};
|
||||
bool success = ((TLS::TLSv12&)*m_socket).connect(m_request.url().host(), m_request.url().port());
|
||||
bool success = ((TLS::TLSv12&)*m_socket).connect(m_request.url().host(), m_request.url().port_or_default());
|
||||
if (!success) {
|
||||
deferred_invoke([this] {
|
||||
return did_fail(Core::NetworkJob::Error::ConnectionFailed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue