diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-10 08:48:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-10 13:15:44 +0100 |
commit | a504ac3e2a57654b96501b3a1ba80f37b3381dc8 (patch) | |
tree | 767a7e21a858e4b5c6dfec77dd52b540a0e4cf49 /Userland/Services/WebServer | |
parent | 03cc45e5a2ecc5d173aa121404d7ed8251c109f8 (diff) | |
download | serenity-a504ac3e2a57654b96501b3a1ba80f37b3381dc8.zip |
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
Diffstat (limited to 'Userland/Services/WebServer')
-rw-r--r-- | Userland/Services/WebServer/Client.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp index 45e5c9cdb0..c241da351c 100644 --- a/Userland/Services/WebServer/Client.cpp +++ b/Userland/Services/WebServer/Client.cpp @@ -214,8 +214,8 @@ ErrorOr<void> Client::send_response(Stream& response, HTTP::HttpRequest const& r } while (true); auto keep_alive = false; - if (auto it = request.headers().find_if([](auto& header) { return header.name.equals_ignoring_case("Connection"sv); }); !it.is_end()) { - if (it->value.trim_whitespace().equals_ignoring_case("keep-alive"sv)) + if (auto it = request.headers().find_if([](auto& header) { return header.name.equals_ignoring_ascii_case("Connection"sv); }); !it.is_end()) { + if (it->value.trim_whitespace().equals_ignoring_ascii_case("keep-alive"sv)) keep_alive = true; } if (!keep_alive) @@ -380,7 +380,7 @@ bool Client::verify_credentials(Vector<HTTP::HttpRequest::Header> const& headers VERIFY(Configuration::the().credentials().has_value()); auto& configured_credentials = Configuration::the().credentials().value(); for (auto& header : headers) { - if (header.name.equals_ignoring_case("Authorization"sv)) { + if (header.name.equals_ignoring_ascii_case("Authorization"sv)) { auto provided_credentials = HTTP::HttpRequest::parse_http_basic_authentication_header(header.value); if (provided_credentials.has_value() && configured_credentials.username == provided_credentials->username && configured_credentials.password == provided_credentials->password) return true; |