mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10: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
|
@ -171,7 +171,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
|
|||
dbgln("XHR send from {} to {}", m_window->associated_document().url(), request_url);
|
||||
|
||||
// TODO: Add support for preflight requests to support CORS requests
|
||||
Origin request_url_origin = Origin(request_url.protocol(), request_url.host(), request_url.port());
|
||||
Origin request_url_origin = Origin(request_url.protocol(), request_url.host(), request_url.port_or_default());
|
||||
|
||||
bool should_enforce_same_origin_policy = true;
|
||||
if (auto* page = m_window->page())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue