summaryrefslogtreecommitdiffhomepage
path: root/response.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'response.cpp')
-rw-r--r--response.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/response.cpp b/response.cpp
index 17d3e48..29176af 100644
--- a/response.cpp
+++ b/response.cpp
@@ -319,11 +319,11 @@ response_type generate_response(request_type& req, Server& server)
std::string res_data { plugin->generate_page(GetServerParamFunction, GetRequestParamFunction, SetResponseHeaderFunction)};
if (req.method() == http::verb::head) {
- res.content_length(res_data.size());
+ res.body() = std::string{};
} else {
res.body() = res_data;
- res.prepare_payload();
}
+ res.prepare_payload();
return HttpStatusAndStats("200", "OK", req_ctx, res);
} catch(const std::out_of_range& ex) {