Minor fixes in Common/Net from Nemo's writeup

This commit is contained in:
Henrik Rydgård
2026-08-09 19:03:28 +02:00
parent 78b25599f3
commit d31b475bb2
4 changed files with 20 additions and 30 deletions
+1 -1
View File
@@ -352,7 +352,7 @@ void Server::HandleRequestDefault(const ServerRequest &request) {
}
void Server::Handle404(const ServerRequest &request) {
INFO_LOG(Log::HTTP, "No handler for '%.*s', falling back to 404.", (int)request.resource().size(), request.resource().data());
INFO_LOG(Log::HTTP, "No handler for '%.*s', falling back to 404.", STR_VIEW(request.resource()));
const char *payload = "<html><body>404 not found</body></html>\r\n";
request.WriteHttpResponseHeader("1.0", 404, strlen(payload));
request.Out()->Push(payload);