Skip to content

Commit

Permalink
istream/DechunkIstream: include not-yet-received portion of current c…
Browse files Browse the repository at this point in the history
…hunk

If the response is going to be re-chunked, this allows creating larger
chunks.
  • Loading branch information
MaxKellermann committed Aug 17, 2023
1 parent 9d0333a commit c217392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/istream/DechunkIstream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c217392

Please sign in to comment.