diff --git a/emmett/__version__.py b/emmett/__version__.py index fbfaae44..2e6e020c 100644 --- a/emmett/__version__.py +++ b/emmett/__version__.py @@ -1 +1 @@ -__version__ = "2.5.7" +__version__ = "2.5.8" diff --git a/emmett/http.py b/emmett/http.py index d882b476..da44e28b 100644 --- a/emmett/http.py +++ b/emmett/http.py @@ -221,7 +221,13 @@ async def asgi(self, scope, send): return self._headers.update(self._get_stat_headers(stat_data)) await self._send_headers(send) - await self._send_body(send) + if 'http.response.pathsend' in scope['extensions']: + await send({ + 'type': 'http.response.pathsend', + 'path': str(self.file_path) + }) + else: + await self._send_body(send) except IOError as e: if e.errno == errno.EACCES: await HTTP(403).send(scope, send) diff --git a/pyproject.toml b/pyproject.toml index 102f3df4..24c4949b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "emmett" [tool.poetry] name = "emmett" -version = "2.5.7" +version = "2.5.8" description = "The web framework for inventors" authors = ["Giovanni Barillari "] license = "BSD-3-Clause" @@ -47,7 +47,7 @@ emmett = "emmett.cli:main" [tool.poetry.dependencies] python = "^3.8" click = ">=6.0" -granian = "~0.7.0" +granian = "~1.0.0" emmett-crypto = "^0.5" pendulum = "~3.0.0" pyDAL = "17.3"