From 2babeb4b114be2e4e2ee47303b8ae51f30b32e4e Mon Sep 17 00:00:00 2001 From: gns333 Date: Tue, 5 Jan 2016 12:26:11 +0800 Subject: [PATCH] Fix for issue #536 "hello_world_client can't commuicate with the hello_world_async_server_with_work_queue" --- boost/network/protocol/http/server/async_connection.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boost/network/protocol/http/server/async_connection.hpp b/boost/network/protocol/http/server/async_connection.hpp index 131aa2890..2e259bfa3 100644 --- a/boost/network/protocol/http/server/async_connection.hpp +++ b/boost/network/protocol/http/server/async_connection.hpp @@ -635,6 +635,14 @@ struct async_connection write_vec_impl(seq, callback, temporaries, buffers); }; if (!headers_already_sent && !headers_in_progress) { + typedef constants consts; + { + std::ostream stream(&headers_buffer); + stream << consts::http_slash() << 1 << consts::dot() << 1 + << consts::space() << status << consts::space() + << status_message(status) << consts::crlf(); + stream << consts::crlf(); + } write_headers_only(continuation); return; }