()
| 1002 | def modifying_middleware(app: ASGIApp) -> ASGIApp: |
| 1003 | async def wrapped_app(scope: Scope, receive: Receive, send: Send) -> None: |
| 1004 | async def wrapped_receive() -> Message: |
| 1005 | msg = await receive() |
| 1006 | if msg["type"] == "http.request": # pragma: no branch |
| 1007 | msg["body"] = msg["body"] * 2 |
| 1008 | return msg |
| 1009 | |
| 1010 | await app(scope, wrapped_receive, send) |
| 1011 |