From 105ebbce53ce3e28890c08961168dd21760676b9 Mon Sep 17 00:00:00 2001 From: cflip Date: Sat, 17 Sep 2022 10:26:22 -0600 Subject: Pass HTTP headers from CGI output into our HttpResponse class --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index cec6d3e..2b93b07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,8 +74,7 @@ static HttpResponse serve_from_cgi(const std::string& executable_path, HttpReque // TODO: We should be able to construct a repsonse from an entire string // instead of always needing to individually set headers and content. response.set_status_code(HttpStatusCode::OK); - response.add_header("Content-Type", "text/plain"); - response.set_content(sstream.str()); + response.add_headers_and_content(sstream.str()); return response; } -- cgit v1.2.3