{"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-503351966", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 503351966, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMzM1MTk2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-18T23:45:17Z", "updated_at": "2019-06-18T23:45:17Z", "author_association": "OWNER", "body": "Uvicorn 0.8.1 is our and supports `raw_path`!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-503195217", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 503195217, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMzE5NTIxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-18T15:46:31Z", "updated_at": "2019-06-18T15:54:18Z", "author_association": "OWNER", "body": "How should file serving work?\r\n\r\nStarlette and Sanic both use `aiofiles` - https://github.com/Tinche/aiofiles - which is a small wrapper around file operations which runs them all in an executor thread. It doesn't have any C dependencies so it looks like a good option. [Quart uses it too](https://gitlab.com/pgjones/quart/blob/317562ea660edb7159efc20fa57b95223d408ea0/quart/wrappers/response.py#L122-169).\r\n\r\n`aiohttp` does things differently: it has [an implementation based on sendfile](https://github.com/aio-libs/aiohttp/blob/7a324fd46ff7dc9bb0bb1bc5afb326e04cf7cef0/aiohttp/web_fileresponse.py#L46-L122) with [an alternative fallback](https://github.com/aio-libs/aiohttp/blob/7a324fd46ff7dc9bb0bb1bc5afb326e04cf7cef0/aiohttp/web_fileresponse.py#L175-L200) which reads chunks from a file object and yields them one chunk at a time, \r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null}