mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-09-30 20:52:31 +07:00
write_content_with_progress() advances its offset only by what the provider writes, so a provider that reported success without writing anything and without calling done() was handed the same offset and length again on the next pass. With the peer still connected it spun there, re-entering the provider as fast as the loop could run. make_file_body()'s provider was one way to reach this and was fixed in #2566, but any user-supplied provider can do the same. Treat a pass that makes no progress as a short body, which is how done() called early is already handled.