summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/json_html_serializer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/json_html_serializer.cpp b/src/json_html_serializer.cpp
index 405061beee..8322f1dd8a 100644
--- a/src/json_html_serializer.cpp
+++ b/src/json_html_serializer.cpp
@@ -562,8 +562,10 @@ void dumpHtml(std::string& out, const nlohmann::json& json)
void prettyPrintJson(crow::Response& res)
{
- json_html_util::dumpHtml(res.body(), res.jsonValue);
+ std::string html;
+ json_html_util::dumpHtml(html, res.jsonValue);
+ res.write(std::move(html));
res.addHeader(boost::beast::http::field::content_type,
"text/html;charset=UTF-8");
}