Skip to content

Commit f4530ab

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: [#11618] minor tweaks [OptionsResolver] Minor reword in the description Add note about extra configuration for mod_xsendfile
2 parents 59f9edb + 8acaa40 commit f4530ab

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

components/http_foundation.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,26 @@ if it should::
566566

567567
BinaryFileResponse::trustXSendfileTypeHeader();
568568

569+
.. note::
570+
571+
The ``BinaryFileResponse`` will only handle ``X-Sendfile`` if the particular header is present.
572+
For Apache, this is not the default case.
573+
574+
To add the header use the ``mod_headers`` Apache module and add the following to the Apache configuration:
575+
576+
.. code-block:: apache
577+
578+
<IfModule mod_xsendfile.c>
579+
# This is already present somewhere...
580+
XSendFile on
581+
XSendFilePath ...some path...
582+
583+
# This needs to be added:
584+
<IfModule mod_headers.c>
585+
RequestHeader set X-Sendfile-Type X-Sendfile
586+
</IfModule>
587+
</IfModule>
588+
569589
With the ``BinaryFileResponse``, you can still set the ``Content-Type`` of the sent file,
570590
or change its ``Content-Disposition``::
571591

components/options_resolver.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
The OptionsResolver Component
66
=============================
77

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

1213
Installation
1314
------------

0 commit comments

Comments
 (0)