]> git.ipfire.org Git - thirdparty/starlette.git/commit
Middleware should treat `body` in response ASGI messages as an optional key. (#935)
authoreuri10 <euri10@users.noreply.github.com>
Thu, 7 May 2020 12:50:24 +0000 (14:50 +0200)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 12:50:24 +0000 (14:50 +0200)
commite57fa2a6b1b19dd118c26a21b2f5bd4dbe46c64a
tree3a029df7288839c2b64f9a5761167e7de1038366
parent97257515f8806b8cc519d9850ecadd783b3008f9
Middleware should treat `body` in response ASGI messages as an optional key. (#935)

* Failing test for HEAD method when using a middleware

* Fixed by sending empty body if send_header_only

* Lint

* Respect asgi spec

* Be explicit in case we send headers only
starlette/middleware/base.py
starlette/responses.py
tests/test_staticfiles.py