This regression was caused by 818e59a3f0. The patch is a partial backport of the new FileResponse class available in later Django versions. Thanks Raphaël Hertzog for the report, and Tim Graham and Collin Anderson for the reviews.