Skip to content

Cherry picked relevant chunked transfer encoding commits from master #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Fix compilation errors with VS2015 (#762)
  • Loading branch information
umennel committed Mar 31, 2018
commit e14fe25e65b65634d737ee957389597808e2d269
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <boost/network/traits/ostream_iterator.hpp>
#include <boost/network/version.hpp>
#include <boost/range/algorithm/transform.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/throw_exception.hpp>

namespace boost {
Expand Down Expand Up @@ -485,8 +486,10 @@ struct http_async_connection
if (this->is_chunk_encoding && remove_chunk_markers_) {
for (size_t i = 0; i < this->partial_parsed.size(); i += 1024) {
auto range = parse_chunk_encoding(boost::make_iterator_range(
this->partial_parsed.data() + i,
this->partial_parsed.data() +
static_cast<typename std::array<typename char_<Tag>::type, 1024>::const_iterator>(
this->partial_parsed.data()) + i,
static_cast<typename std::array<typename char_<Tag>::type, 1024>::const_iterator>(
this->partial_parsed.data()) +
std::min(i + 1024, this->partial_parsed.size())));
body_string.append(boost::begin(range), boost::end(range));
}
Expand Down