mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-05 04:01:29 +08:00
_handle_stream_ended() in async_connection.py (used by the ASGI worker) did not set stream._body_complete = True or signal stream._body_event. This caused the receive() closure in protocol.py to never see the body as complete via the streaming path, so on the next call the fast path re-read the entire body from BytesIO, doubling it. The sync handler in connection.py already had a partial fix from #3559 but was also missing _body_event signalling, which is needed to unblock any pending read_body_chunk() await. Fixes https://github.com/benoitc/gunicorn/discussions/3567