From c30906a541107df69cf09af008db749a92fa7d02 Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 7 Jul 2023 19:43:37 -0400 Subject: [PATCH] Code cleanup --- httplib.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/httplib.h b/httplib.h index e14bc7d..ce15f40 100644 --- a/httplib.h +++ b/httplib.h @@ -6262,15 +6262,10 @@ Server::process_request(Stream &strm, bool close_connection, if (!line_reader.getline()) { return false; } Request req; + Response res; - res.version = "HTTP/1.1"; - - for (const auto &header : default_headers_) { - if (res.headers.find(header.first) == res.headers.end()) { - res.headers.insert(header); - } - } + res.headers = default_headers_; #ifdef _WIN32 // TODO: Increase FD_SETSIZE statically (libzmq), dynamically (MySQL).