1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-07-02 14:04:16 +00:00

No need to prepare mustache context if no body is required.

This commit is contained in:
King_DuckZ 2017-05-23 20:24:56 +01:00
parent 7549c0e664
commit 847988f4bd

View file

@ -205,10 +205,10 @@ namespace tawashi {
HttpHeader http_header = this->on_process(); HttpHeader http_header = this->on_process();
*m_stream_out << http_header; *m_stream_out << http_header;
if (http_header.body_required()) {
SPDLOG_TRACE(statuslog, "Raising event on_mustache_prepare"); SPDLOG_TRACE(statuslog, "Raising event on_mustache_prepare");
this->on_mustache_prepare(mustache_context); this->on_mustache_prepare(mustache_context);
if (http_header.body_required()) {
SPDLOG_TRACE(statuslog, "Rendering in mustache"); SPDLOG_TRACE(statuslog, "Rendering in mustache");
*m_stream_out << mstch::render( *m_stream_out << mstch::render(
on_mustache_retrieve(), on_mustache_retrieve(),