id summary reporter owner description type status milestone component version severity resolution keywords cc 12131 Boost Asio async HTTP Client example source code incorrect Micah Quinn chris_kohlhoff "The example source code for the async HTTP Client (http://www.boost.org/doc/libs/1_60_0/doc/html/boost_asio/example/cpp03/http/client/async_client.cpp) does not output the final read bytes inside ""handle_read_content"" if the parameter to the transfer_at_least(x) algorithm is greater than one. The code prematurely checks for an error code and disregards any already read data. The current code in question: {{{ void handle_read_content(const boost::system::error_code& err) { if (!err) { // Write all of the data that has been read so far. std::cout << &response_; // Continue reading remaining data until EOF. boost::asio::async_read(socket_, response_, boost::asio::transfer_at_least(1), boost::bind(&client::handle_read_content, this, boost::asio::placeholders::error)); } else if (err != boost::asio::error::eof) { std::cout << ""Error: "" << err << ""\n""; } } }}} One possible ""fix"" for the code would be: {{{ void handle_read_content(const boost::system::error_code& err) { // Write all of the data that has been read so far. if ( response_.size() > 0 ) std::cout << &response_; if (!err) { // Continue reading remaining data until EOF. boost::asio::async_read(socket_, response_, boost::asio::transfer_at_least(1024), boost::bind(&client::handle_read_content, this, boost::asio::placeholders::error)); } else if (err != boost::asio::error::eof) { std::cout << ""Error: "" << err << ""\n""; } } }}}" Bugs new To Be Determined asio Boost 1.61.0 Problem