From 0ddc469edd2d26ce987334418ea964b5000f4691 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 3 Aug 2015 21:37:44 +0200 Subject: [PATCH] Minor fix. --- server_http.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server_http.hpp b/server_http.hpp index 9f54eef..71fc8c9 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -273,9 +273,8 @@ namespace SimpleWeb { if(timeout_content>0) timer=set_timeout_on_socket(socket, timeout_content); try { - auto content_length=stoull(it->second); boost::asio::async_read(*socket, request->streambuf, - boost::asio::transfer_exactly(content_length-num_additional_bytes), + boost::asio::transfer_exactly(stoull(it->second)-num_additional_bytes), [this, socket, request, timer] (const boost::system::error_code& ec, size_t /*bytes_transferred*/) { if(timeout_content>0)