              self['Content-Length'] = os.path.getsize(filelike.name)
          elif hasattr(filelike, 'getbuffer'):
              self['Content-Length'] = filelike.getbuffer().nbytes
  
          if self.get('Content-Type', '').startswith(settings.DEFAULT_CONTENT_TYPE):
              if filename:
                  content_type, encoding = mimetypes.guess_type(filename)
                  # Encoding isn't set to prevent browsers from automatically
                  # uncompressing files.
                  content_type = encoding_map.get(encoding, content_type)
 
</s> remove # Default content type and charset to use for all HttpResponse objects, if a
# MIME type isn't manually specified. These are used to construct the
# Content-Type header.
DEFAULT_CONTENT_TYPE = 'text/html'
 </s> add # Default charset to use for all HttpResponse objects, if a MIME type isn't
# manually specified. It's used to construct the Content-Type header. </s> remove         content_type = None             # Django will use DEFAULT_CONTENT_TYPE
 </s> add         content_type = None             # Django will use 'text/html'. </s> remove             content_type = '%s; charset=%s' % (settings.DEFAULT_CONTENT_TYPE,
                                               self.charset)
 </s> add             content_type = 'text/html; charset=%s' % self.charset </s> remove     @property
    def DEFAULT_CONTENT_TYPE(self):
        stack = traceback.extract_stack()
        # Show a warning if the setting is used outside of Django.
        # Stack index: -1 this line, -2 the caller.
        filename, _line_number, _function_name, _text = stack[-2]
        if not filename.startswith(os.path.dirname(django.__file__)):
            warnings.warn(
                DEFAULT_CONTENT_TYPE_DEPRECATED_MSG,
                RemovedInDjango30Warning,
                stacklevel=2,
            )
        return self.__getattr__('DEFAULT_CONTENT_TYPE')

 </s> add  </s> remove from django.utils.deprecation import (
    RemovedInDjango30Warning, RemovedInDjango31Warning,
)
 </s> add from django.utils.deprecation import RemovedInDjango31Warning
        if self.get('Content-Type', '').startswith('text/html'):
              self['Content-Length'] = os.path.getsize(filelike.name)
          elif hasattr(filelike, 'getbuffer'):
              self['Content-Length'] = filelike.getbuffer().nbytes
  
        if self.get('Content-Type', '').startswith('text/html'):
              if filename:
                  content_type, encoding = mimetypes.guess_type(filename)
                  # Encoding isn't set to prevent browsers from automatically
                  # uncompressing files.
                  content_type = encoding_map.get(encoding, content_type)
keep keep keep keep replace keep keep keep keep keep
 Refs #27829 -- Removed settings.DEFAULT_CONTENT_TYPE per deprecation timeline. 
django/http/response.py