Ladybird/Everywhere: Replace "protocol" with "scheme" url helpers

See 4230dbbb21
This commit is contained in:
networkException 2022-09-29 10:55:53 +02:00 committed by Andrew Kaster
parent bf26b52ac6
commit f1c7ee2810
Notes: sideshowbarker 2024-07-17 04:21:32 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -273,7 +273,7 @@ Vector<Web::Cookie::Cookie&> CookieJar::get_matching_cookies(const URL& url, Str
continue;
// If the cookie's secure-only-flag is true, then the request-uri's scheme must denote a "secure" protocol.
if (cookie.value.secure && (url.protocol() != "https"))
if (cookie.value.secure && (url.scheme() != "https"))
continue;
// If the cookie's http-only-flag is true, then exclude the cookie if the cookie-string is being generated for a "non-HTTP" API.

View file

@ -23,7 +23,7 @@ void RequestManagerQt::reply_finished(QNetworkReply* reply)
RefPtr<Web::ResourceLoaderConnectorRequest> RequestManagerQt::start_request(String const& method, AK::URL const& url, HashMap<String, String> const& request_headers, ReadonlyBytes request_body, Core::ProxyData const& proxy)
{
if (!url.protocol().is_one_of_ignoring_case("http"sv, "https"sv)) {
if (!url.scheme().is_one_of_ignoring_case("http"sv, "https"sv)) {
return nullptr;
}
auto request_or_error = Request::create(*m_qnam, method, url, request_headers, request_body, proxy);