mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
Previously this could fail - not having read 'end' when the close arrived was treated as a premature close error for finished() and related APIs, even though the body data was cleanly ended and complete. We now check whether there is a clean end buffered. If so, we wait until it's read before evaluating whether the stream ended cleanly. Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: https://github.com/nodejs/node/pull/67553 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>