diff --git a/src/istream/DechunkIstream.cxx b/src/istream/DechunkIstream.cxx index d52b82d42..18e011851 100644 --- a/src/istream/DechunkIstream.cxx +++ b/src/istream/DechunkIstream.cxx @@ -407,7 +407,7 @@ DechunkIstream::_GetAvailable(bool partial) noexcept if (!partial && !parser.HasEnded()) return -1; - std::size_t total = 0; + std::size_t total = parser.GetAvailable(); for (const auto &chunk : chunks) { assert(chunk.header > 0 || chunk.data > 0);