mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
This commit is contained in:
parent
03cc45e5a2
commit
a504ac3e2a
76 changed files with 480 additions and 476 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue