Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates httplib dependency to 0.15.3 #5737

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ CPMAddPackage(
CPMAddPackage(
NAME cpp-httplib
GITHUB_REPOSITORY yhirose/cpp-httplib
GIT_TAG v0.11.3
GIT_TAG v0.15.3
) # defines: httplib::httplib

CPMAddPackage(
Expand Down
8 changes: 4 additions & 4 deletions src/world/http_server.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
===========================================================================

Copyright (c) 2022 LandSandBoat Dev Teams
Expand Down Expand Up @@ -141,7 +141,7 @@ HTTPServer::HTTPServer()
m_httpServer.set_error_handler([](httplib::Request const& /*req*/, httplib::Response& res)
{
auto str = fmt::format("<p>Error Status: <span style='color:red;'>{} ({})</span></p>",
res.status, httplib::detail::status_message(res.status));
res.status, httplib::status_message(res.status));

for (auto const& [key, val] : res.headers)
{
Expand All @@ -156,12 +156,12 @@ HTTPServer::HTTPServer()
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
if (res.status >= 500)
{
ShowError(fmt::format("Server Error: {} ({})", res.status, httplib::detail::status_message(res.status)));
ShowError(fmt::format("Server Error: {} ({})", res.status, httplib::status_message(res.status)));
return;
}
else if (res.status >= 400)
{
ShowError(fmt::format("Client Error: {} ({})", res.status, httplib::detail::status_message(res.status)));
ShowError(fmt::format("Client Error: {} ({})", res.status, httplib::status_message(res.status)));
return;
}
});
Expand Down
Loading