From 2b59ba19e0273b8322e900e9c79954ae76abacb3 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 2 Jun 2024 16:54:13 +0100 Subject: [PATCH] LibWeb/WebSockets: Use correct URL parser --- Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp index 559672289cd..fc422390c96 100644 --- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp +++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -45,8 +46,7 @@ WebIDL::ExceptionOr> WebSocket::construct_impl(JS::R auto base_url = relevant_settings_object.api_base_url(); // 2. Let urlRecord be the result of applying the URL parser to url with baseURL. - // FIXME: This should call an implementation of https://url.spec.whatwg.org/#concept-url-parser, currently it calls https://url.spec.whatwg.org/#concept-basic-url-parser - auto url_record = base_url.complete_url(url); + auto url_record = DOMURL::parse(url, base_url); // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. if (!url_record.is_valid())