diff options
| author | Carlton Gibson <carlton@noumenal.es> | 2021-10-15 07:29:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-15 07:29:55 +0200 |
| commit | 4a58dfd9dbbc1c62945e1cfcfe2b7da04b035ca0 (patch) | |
| tree | 7552d3f6f5a9ca219fdb23ac2108da997b8741d7 /django/http/response.py | |
| parent | 15683cdb95eb471f801bd15aca47348f9bb6cba5 (diff) | |
Refs #30509 -- Adjusted internal FileResponse variable name.
Follow up to dc724c5bf9d3b8d59c9571aa751c3cd001cdeced.
Diffstat (limited to 'django/http/response.py')
| -rw-r--r-- | django/http/response.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/http/response.py b/django/http/response.py index 68b7a8f285..847d824191 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -438,7 +438,7 @@ class FileResponse(StreamingHttpResponse): def __init__(self, *args, as_attachment=False, filename='', **kwargs): self.as_attachment = as_attachment self.filename = filename - self._no_default_content_type_set = 'content_type' not in kwargs or kwargs['content_type'] is None + self._no_explicit_content_type = 'content_type' not in kwargs or kwargs['content_type'] is None super().__init__(*args, **kwargs) def _set_streaming_content(self, value): @@ -476,7 +476,7 @@ class FileResponse(StreamingHttpResponse): filelike.seek(-int(self.headers['Content-Length']), io.SEEK_END) filename = os.path.basename(self.filename or filename) - if self._no_default_content_type_set: + if self._no_explicit_content_type: if filename: content_type, encoding = mimetypes.guess_type(filename) # Encoding isn't set to prevent browsers from automatically |
