From 78fd6415e67d197cd18af5173dcc651c389de008 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Fri, 3 Apr 2015 13:44:43 +0200 Subject: [PATCH] Bugfix: fileserver example chunked data `boost::asio::const_buffers_1` expects a size as second parameter, not the end pointer --- libs/network/example/http/fileserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/network/example/http/fileserver.cpp b/libs/network/example/http/fileserver.cpp index 22873211a..9951d6957 100644 --- a/libs/network/example/http/fileserver.cpp +++ b/libs/network/example/http/fileserver.cpp @@ -134,7 +134,7 @@ struct connection_handler : boost::enable_shared_from_this { connection->write( boost::asio::const_buffers_1( static_cast(mmaped_region.first) + offset, - rightmost_bound), + rightmost_bound - offset), boost::bind(&connection_handler::handle_chunk, connection_handler::shared_from_this(), mmaped_region, rightmost_bound, connection, _1));