aboutsummaryrefslogtreecommitdiffstats
path: root/http_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'http_connection.h')
-rw-r--r--http_connection.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/http_connection.h b/http_connection.h
index 2f245ba..f248907 100644
--- a/http_connection.h
+++ b/http_connection.h
@@ -36,7 +36,10 @@ namespace flask
std::vector<boost::asio::const_buffer> buffers;
- buffers.push_back(boost::asio::buffer(statusCodes[res.status]));
+ buffers.push_back(boost::asio::buffer(statusCodes[res.code]));
+
+ if (res.code > 400 && res.body.empty())
+ res.body = statusCodes[res.code].substr(9);
bool has_content_length = false;
for(auto& kv : res.headers)