Skip to content

Commit 7d6fe06

Browse files
committed
IEQUALS
1 parent 93bb50b commit 7d6fe06

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

runtime-light/server/http/init-functions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ std::string_view process_headers(const tl::K2InvokeHttp& invoke_http, PhpScriptB
161161
http_server_instance_st.encoding |= HttpServerInstanceState::ENCODING_DEFLATE;
162162
}
163163
} else if (h_name == kphp::http::headers::CONNECTION) {
164-
auto iequals{[](std::string_view s1, std::string_view s2) noexcept {
164+
static constexpr auto IEQUALS{[](std::string_view s1, std::string_view s2) noexcept {
165165
return std::ranges::equal(s1, s2,
166166
[](char a, char b) noexcept { return std::tolower(a, std::locale::classic()) == std::tolower(b, std::locale::classic()); });
167167
}};
168168

169-
if (iequals(h_value, CONNECTION_KEEP_ALIVE)) [[likely]] {
169+
if (IEQUALS(h_value, CONNECTION_KEEP_ALIVE)) [[likely]] {
170170
http_server_instance_st.connection_kind = kphp::http::connection_kind::keep_alive;
171-
} else if (iequals(h_value, CONNECTION_CLOSE)) [[likely]] {
171+
} else if (IEQUALS(h_value, CONNECTION_CLOSE)) [[likely]] {
172172
http_server_instance_st.connection_kind = kphp::http::connection_kind::close;
173173
} else {
174174
kphp::log::error("unexpected connection header: {}", h_value);

0 commit comments

Comments
 (0)