summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http_connection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/http_connection.cpp b/http_connection.cpp
index 863aca1..128abf5 100644
--- a/http_connection.cpp
+++ b/http_connection.cpp
@@ -14,10 +14,14 @@ void HTTP::Connection::add_header(std::string key, std::string value) {
}
void HTTP::Connection::send_data(const std::string& data) {
+ write_headers();
+
boost::asio::write(socket, boost::asio::buffer(data));
}
void HTTP::Connection::send_data(const void* data, std::size_t size) {
+ write_headers();
+
boost::asio::write(socket, boost::asio::buffer(data, size));
}