summaryrefslogtreecommitdiff
path: root/docs/ref/request-response.txt
diff options
context:
space:
mode:
authorShingenPizza <19253513+ShingenPizza@users.noreply.github.com>2019-05-17 12:07:27 +0200
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-05-17 12:07:27 +0200
commitde4832c49b8a8cf00b2d602ab4d10c4ca69627bd (patch)
tree241c7e3a07366d29b73301db9db06d42ce407ab9 /docs/ref/request-response.txt
parent5c19274643dacc0a16e26634aa5dc34bd11a7077 (diff)
Fixed #30196 -- Made FileResponse set Content-Disposition inline if filename is available.
Diffstat (limited to 'docs/ref/request-response.txt')
-rw-r--r--docs/ref/request-response.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 58a7c3e7e4..28e5170595 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -1107,15 +1107,17 @@ Attributes
optimized for binary files. It uses `wsgi.file_wrapper`_ if provided by the
wsgi server, otherwise it streams the file out in small chunks.
- If ``as_attachment=True``, the ``Content-Disposition`` header is set, which
- asks the browser to offer the file to the user as a download.
+ If ``as_attachment=True``, the ``Content-Disposition`` header is set to
+ ``attachment``, which asks the browser to offer the file to the user as a
+ download. Otherwise, a ``Content-Disposition`` header with a value of
+ ``inline`` (the browser default) will be set only if a filename is
+ available.
If ``open_file`` doesn't have a name or if the name of ``open_file`` isn't
appropriate, provide a custom file name using the ``filename`` parameter.
- The ``Content-Length``, ``Content-Type``, and ``Content-Disposition``
- headers are automatically set when they can be guessed from contents of
- ``open_file``.
+ The ``Content-Length`` and ``Content-Type`` headers are automatically set
+ when they can be guessed from contents of ``open_file``.
.. _wsgi.file_wrapper: https://www.python.org/dev/peps/pep-3333/#optional-platform-specific-file-handling