aboutsummaryrefslogtreecommitdiffstats
path: root/http_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'http_connection.h')
-rw-r--r--http_connection.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/http_connection.h b/http_connection.h
index 6338c6f..d486d01 100644
--- a/http_connection.h
+++ b/http_connection.h
@@ -72,7 +72,6 @@ namespace flask
std::cerr << "HTTP/" << parser_.http_major << "." << parser_.http_minor << ' ';
std::cerr << method_name(req.method);
std::cerr << " " << res.code << std::endl;
- std::cerr << "res body: " << res.body << std::endl;
#endif
static std::string seperator = ": ";
@@ -81,7 +80,7 @@ namespace flask
buffers_.clear();
buffers_.reserve(4*(res.headers.size()+4)+3);
- if (res.body.empty() && res.json_value.t == json::type::Object)
+ if (res.body.empty() && res.json_value.t() == json::type::Object)
{
res.body = json::dump(res.json_value);
}
@@ -161,6 +160,7 @@ namespace flask
do_read();
else
{
+ socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
socket_.close();
life_--;