Fix for GZipMiddleware when serving files or streaming or using iterators
A simple replacement for Django's default GZipMiddleware which breaks when trying to serve files or pass any kind of iterators to the HttpResponse object. Simply replace GZipMiddleware with the provided middleware and set response.dontgzip = True when returning the response, and it will then be ignored by the middleware.
- files
- gzip
- streaming
- gzipmiddleware