diff options
-rw-r--r-- | include/http_connection.h | 4 | ||||
-rw-r--r-- | include/json.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/http_connection.h b/include/http_connection.h index 3d516a9..69b87b0 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -420,7 +420,7 @@ namespace crow } if (add_keep_alive_) { - static std::string keep_alive_tag = "Connetion: Keep-Alive"; + static std::string keep_alive_tag = "Connection: Keep-Alive"; buffers_.emplace_back(keep_alive_tag.data(), keep_alive_tag.size()); buffers_.emplace_back(crlf.data(), crlf.size()); } @@ -430,7 +430,6 @@ namespace crow buffers_.emplace_back(res_body_copy_.data(), res_body_copy_.size()); do_write(); - res.clear(); if (need_to_start_read_after_complete_) { @@ -488,6 +487,7 @@ namespace crow [&](const boost::system::error_code& ec, std::size_t bytes_transferred) { is_writing = false; + res.clear(); res_body_copy_.clear(); if (!ec) { diff --git a/include/json.h b/include/json.h index 6f9fec9..7d840fa 100644 --- a/include/json.h +++ b/include/json.h @@ -82,7 +82,7 @@ namespace crow Object, }; - const char* get_type_str(type t) { + inline const char* get_type_str(type t) { switch(t){ case type::Number: return "Number"; case type::False: return "False"; |