Fix Content-Length parsing

Fix #1880
This commit is contained in:
Richard Hodges
2020-03-19 16:21:29 +01:00
parent 5e9e517dc5
commit d12dcef52c
6 changed files with 113 additions and 20 deletions
@@ -56,6 +56,16 @@ put(ConstBufferSequence const& buffers,
buf_.get(), size}, ec);
}
template<bool isRequest>
boost::optional<std::uint64_t>
basic_parser<isRequest>::
content_length_unchecked() const
{
if(f_ & flagContentLength)
return len0_;
return boost::none;
}
template<bool isRequest>
template<class ConstBufferSequence>
std::size_t