diff options
author | networkException <git@nwex.de> | 2022-09-29 01:30:58 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-29 09:39:04 +0100 |
commit | 4230dbbb21ec68cbb9844130d5e90276c96d16c2 (patch) | |
tree | a2586bed833a3577a997d2e8cd5e7df232978bc1 /Userland/Utilities/headless-browser.cpp | |
parent | 454bf1fde054591d1215404617126ce31b281171 (diff) | |
download | serenity-4230dbbb21ec68cbb9844130d5e90276c96d16c2.zip |
AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.
See https://url.spec.whatwg.org/#concept-url-scheme
Diffstat (limited to 'Userland/Utilities/headless-browser.cpp')
-rw-r--r-- | Userland/Utilities/headless-browser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index 58e151bfa9..4f90d19ffe 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -515,19 +515,19 @@ public: virtual RefPtr<Web::ResourceLoaderConnectorRequest> start_request(String const& method, AK::URL const& url, HashMap<String, String> const& request_headers, ReadonlyBytes request_body, Core::ProxyData const& proxy) override { RefPtr<Web::ResourceLoaderConnectorRequest> request; - if (url.protocol().equals_ignoring_case("http"sv)) { + if (url.scheme().equals_ignoring_case("http"sv)) { auto request_or_error = HTTPHeadlessRequest::create(method, url, request_headers, request_body, proxy); if (request_or_error.is_error()) return {}; request = request_or_error.release_value(); } - if (url.protocol().equals_ignoring_case("https"sv)) { + if (url.scheme().equals_ignoring_case("https"sv)) { auto request_or_error = HTTPSHeadlessRequest::create(method, url, request_headers, request_body, proxy); if (request_or_error.is_error()) return {}; request = request_or_error.release_value(); } - if (url.protocol().equals_ignoring_case("gemini"sv)) { + if (url.scheme().equals_ignoring_case("gemini"sv)) { auto request_or_error = GeminiHeadlessRequest::create(method, url, request_headers, request_body, proxy); if (request_or_error.is_error()) return {}; |