Chris Long committed dcf11a1

Fixing a bug when using Django-Storages w/ the staticfiles contrib, it keeps the GZIP header for files where gzip does no apply

  • Participants
  • Parent commits def7324

Comments (0)

Files changed (1)

File storages/backends/

     def _save(self, name, content):
         cleaned_name = self._clean_name(name)
         name = self._normalize_name(cleaned_name)
-        headers = self.headers
+        headers = self.headers.copy()
         content_type = getattr(content,'content_type', mimetypes.guess_type(name)[0] or Key.DefaultContentType)
         if self.gzip and content_type in self.gzip_content_types: