Skip to content

Commit 6ee5ad4

Browse files
committed
Fixing issue where Boost.Asio based http_listener doesn't properly close the request stream once all data has arrived.
1 parent 508d460 commit 6ee5ad4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Release/src/http/listener/http_server_asio.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ void connection::handle_headers()
363363
m_chunked = boost::ifind_first(name, U("chunked"));
364364
}
365365

366-
Concurrency::streams::producer_consumer_buffer<uint8_t> buf;
367-
m_request._get_impl()->set_instream(buf.create_istream());
368-
m_request._get_impl()->set_outstream(buf.create_ostream(), false);
366+
m_request._get_impl()->_prepare_to_receive_data();
369367
if (m_chunked)
370368
{
371369
boost::asio::async_read_until(*m_socket, m_request_buf, CRLF, boost::bind(&connection::handle_chunked_header, this, placeholders::error));

Release/tests/functional/http/listener/request_stream_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace tests { namespace functional { namespace http { namespace listener {
2828
SUITE(request_stream_tests)
2929
{
3030

31-
TEST_FIXTURE(uri_address, large_body, "Ignore:Linux", "712252", "Ignore:Apple", "712252")
31+
TEST_FIXTURE(uri_address, large_body)
3232
{
3333
http_listener listener(m_uri);
3434
listener.open().wait();

0 commit comments

Comments
 (0)