MIME types are defined here : http://www.iana.org/assignments/media-types/index.html and valid types include application/*
, audio/*
, example/*
, image/*
, message/*
, model/*
, multipart/*
, text/*
, video/*
.
If we hardcode that image/*
and video/*
must not be compressed, we should also add audio/*
to the list. But this technique is crude: for instance, application/xml
should be compressed; application/mp4
and application/octet-stream
shouldn't. We're going to have debates about the proper whitelist / blacklist. And adding yet another setting is not the solution. In short, the patch doesn't smell good.
Let's look at the problem differently. It's an Horribly Bad Idea to serve "a 100 Mb Tiff or 2 Gb Mpeg2" through Django. Actually, serving anything that is not programmatically generated by Django through Django is grossly inefficient.
If someone is at that level of non-optimization, clearly, not compressing the HTML is not going to make a difference. Just disable GzipMiddleware and be done with it.
Given all this, plus the fact that the ticket has been rotting for two years, I will close it.