diff --git a/emmett/http.py b/emmett/http.py index da44e28b..c96aa3ea 100644 --- a/emmett/http.py +++ b/emmett/http.py @@ -221,7 +221,7 @@ async def asgi(self, scope, send): return self._headers.update(self._get_stat_headers(stat_data)) await self._send_headers(send) - if 'http.response.pathsend' in scope['extensions']: + if 'http.response.pathsend' in scope.get('extensions', {}): await send({ 'type': 'http.response.pathsend', 'path': str(self.file_path)