Skip to content

Commit

Permalink
Merge branch '3.4' into 4.2
Browse files Browse the repository at this point in the history
* 3.4:
  [symfony#11618] minor tweaks
  [OptionsResolver] Minor reword in the description
  Add note about extra configuration for mod_xsendfile
  • Loading branch information
OskarStark committed Jun 14, 2019
2 parents 59f9edb + 8acaa40 commit f4530ab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
20 changes: 20 additions & 0 deletions components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,26 @@ if it should::

BinaryFileResponse::trustXSendfileTypeHeader();

.. note::

The ``BinaryFileResponse`` will only handle ``X-Sendfile`` if the particular header is present.
For Apache, this is not the default case.

To add the header use the ``mod_headers`` Apache module and add the following to the Apache configuration:

.. code-block:: apache
<IfModule mod_xsendfile.c>
# This is already present somewhere...
XSendFile on
XSendFilePath ...some path...
# This needs to be added:
<IfModule mod_headers.c>
RequestHeader set X-Sendfile-Type X-Sendfile
</IfModule>
</IfModule>
With the ``BinaryFileResponse``, you can still set the ``Content-Type`` of the sent file,
or change its ``Content-Disposition``::

Expand Down
7 changes: 4 additions & 3 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
The OptionsResolver Component
=============================

The OptionsResolver component is :phpfunction:`array_replace` on steroids.
It allows you to create an options system with required options, defaults,
validation (type, value), normalization and more.
The OptionsResolver component is an improved replacement for the
:phpfunction:`array_replace` PHP function. It allows you to create an
options system with required options, defaults, validation (type, value),
normalization and more.

Installation
------------
Expand Down

0 comments on commit f4530ab

Please sign in to comment.