django-compression-middleware
django-compression-middleware copied to clipboard
Middleware fails when using `async`
The current version breaks when using adrf, which adds async support to Django REST Framework.
While investigating the issue, I noticed that the existing code is based on version of GzipMiddleware that is quite old. I rebased your code on the version that is bundled with the current version of Django, which fixes a security issue and adds support for async workflows. Some checks were added to ensure backward compatibility with older Django versions.
See this pull request: #17.
@friedelwolff would you have time to look into this?