From 46f6b40207dd3fbe3ad6c723e124c676b5e21501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Thu, 25 Apr 2019 01:35:55 -0300 Subject: [PATCH] Http response parse minor fix for chunked transfer encoding. --HG-- branch : dev --- src/eepp/network/http.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eepp/network/http.cpp b/src/eepp/network/http.cpp index f22e1d638..0ee532528 100644 --- a/src/eepp/network/http.cpp +++ b/src/eepp/network/http.cpp @@ -225,7 +225,8 @@ void Http::Response::parse(const std::string& data) { // Copy the actual content data std::istreambuf_iterator it(in); - for (std::size_t i = 0; i < length; i++) + std::istreambuf_iterator itEnd; + for (std::size_t i = 0; ((i < length) && (it != itEnd)); i++) mBody.push_back(*it++); }