1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

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
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; continue;
// If the cookie's secure-only-flag is true, then the request-uri's scheme must denote a "secure" protocol. // 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; 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. // 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) 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; return nullptr;
} }
auto request_or_error = Request::create(*m_qnam, method, url, request_headers, request_body, proxy); auto request_or_error = Request::create(*m_qnam, method, url, request_headers, request_body, proxy);