Skip to content

Commit

Permalink
Only stop receiving stream on body_stream if body is empty (#1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored and aminalaee committed Feb 13, 2023
1 parent 3dfaccb commit 512749b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions starlette/middleware/base.py
Expand Up @@ -89,8 +89,6 @@ async def body_stream() -> typing.AsyncGenerator[bytes, None]:
body = message.get("body", b"")
if body:
yield body
if not message.get("more_body", False):
break

if app_exc is not None:
raise app_exc
Expand Down

0 comments on commit 512749b

Please sign in to comment.