summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 23:09:45 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-02 23:09:45 +0100
commitb429cd906e2fcaf96e6ed84d7a1b85b582330a13 (patch)
tree7f9aedea374349af802851d02ec316791116d17d
parent0e3c3380d519b033500b4ed1ccd3acf707c34372 (diff)
Write headers.
-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));
}