asgi-gzip 0.3

Release: asgi-gzip 0.3 (https://github.com/simonw/asgi-gzip/releases/tag/0.3) I ran into trouble deploying a new feature using SSE

Release: asgi-gzip 0.3 (https://github.com/simonw/asgi-gzip/releases/tag/0.3)

I ran into trouble deploying a new feature using SSE (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) to a production Datasette instance, and it turned out that instance was using datasette-gzip (https://github.com/simonw/datasette-gzip) which uses asgi-gzip (https://github.com/simonw/asgi-gzip) which was incorrectly compressing event/text-stream responses.

asgi-gzip was extracted from Starlette, and has a GitHub Actions scheduled workflow (simonwillison starlette git scraping) to check Starlette for updates that need to be ported to the library… but that action had stopped running and hence had missed Starlette’s own fix (https://github.com/Kludex/starlette/commit/a9a8dab0cc3cbd05dca37650fc392717b9fe5bbf) for this issue.

I ran the workflow and integrated the new fix, and now datasette-gzip and asgi-gzip both correctly handle text/event-stream in SSE responses.

    Tags: gzip (https://simonwillison.net/tags/gzip), asgi (https://simonwillison.net/tags/asgi), python (https://simonwillison.net/tags/python)
Write a comment
No comments yet.