summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/LookupServer/LookupServer.cpp2
-rw-r--r--Userland/Services/RequestServer/HttpCommon.h16
-rw-r--r--Userland/Services/WebServer/Client.cpp6
3 files changed, 12 insertions, 12 deletions
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp
index b0b618d11a..fe2d816dfc 100644
--- a/Userland/Services/LookupServer/LookupServer.cpp
+++ b/Userland/Services/LookupServer/LookupServer.cpp
@@ -278,7 +278,7 @@ ErrorOr<Vector<Answer>> LookupServer::lookup(Name const& name, DeprecatedString
auto& response_question = response.questions()[i];
bool match = request_question.class_code() == response_question.class_code()
&& request_question.record_type() == response_question.record_type()
- && request_question.name().as_string().equals_ignoring_case(response_question.name().as_string());
+ && request_question.name().as_string().equals_ignoring_ascii_case(response_question.name().as_string());
if (!match) {
dbgln("Request and response questions do not match");
dbgln(" Request: name=_{}_, type={}, class={}", request_question.name().as_string(), response_question.record_type(), response_question.class_code());
diff --git a/Userland/Services/RequestServer/HttpCommon.h b/Userland/Services/RequestServer/HttpCommon.h
index 3cc50c7d33..97ff021ded 100644
--- a/Userland/Services/RequestServer/HttpCommon.h
+++ b/Userland/Services/RequestServer/HttpCommon.h
@@ -71,21 +71,21 @@ OwnPtr<Request> start_request(TBadgedProtocol&& protocol, ConnectionFromClient&
}
HTTP::HttpRequest request;
- if (method.equals_ignoring_case("post"sv))
+ if (method.equals_ignoring_ascii_case("post"sv))
request.set_method(HTTP::HttpRequest::Method::POST);
- else if (method.equals_ignoring_case("head"sv))
+ else if (method.equals_ignoring_ascii_case("head"sv))
request.set_method(HTTP::HttpRequest::Method::HEAD);
- else if (method.equals_ignoring_case("delete"sv))
+ else if (method.equals_ignoring_ascii_case("delete"sv))
request.set_method(HTTP::HttpRequest::Method::DELETE);
- else if (method.equals_ignoring_case("patch"sv))
+ else if (method.equals_ignoring_ascii_case("patch"sv))
request.set_method(HTTP::HttpRequest::Method::PATCH);
- else if (method.equals_ignoring_case("options"sv))
+ else if (method.equals_ignoring_ascii_case("options"sv))
request.set_method(HTTP::HttpRequest::Method::OPTIONS);
- else if (method.equals_ignoring_case("trace"sv))
+ else if (method.equals_ignoring_ascii_case("trace"sv))
request.set_method(HTTP::HttpRequest::Method::TRACE);
- else if (method.equals_ignoring_case("connect"sv))
+ else if (method.equals_ignoring_ascii_case("connect"sv))
request.set_method(HTTP::HttpRequest::Method::CONNECT);
- else if (method.equals_ignoring_case("put"sv))
+ else if (method.equals_ignoring_ascii_case("put"sv))
request.set_method(HTTP::HttpRequest::Method::PUT);
else
request.set_method(HTTP::HttpRequest::Method::GET);
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;