Skip to content

Commit 167bfc5

Browse files
committed
Merge branch '7.2' into 7.3
* 7.2: Update the links related to X-Sendfile and X-Accel-Redirect Update the build script to mention that it does not support Windows
2 parents bcb1ce6 + f839b2f commit 167bfc5

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Diff for: _build/build.php

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
->addOption('generate-fjson-files', null, InputOption::VALUE_NONE, 'Use this option to generate docs both in HTML and JSON formats')
1616
->addOption('disable-cache', null, InputOption::VALUE_NONE, 'Use this option to force a full regeneration of all doc contents')
1717
->setCode(function(InputInterface $input, OutputInterface $output) {
18+
// the doc building app doesn't work on Windows
19+
if ('\\' === DIRECTORY_SEPARATOR) {
20+
$output->writeln('<error>ERROR: The application that builds Symfony Docs does not support Windows. You can try using a Linux distribution via WSL (Windows Subsystem for Linux).</error>');
21+
22+
return 1;
23+
}
24+
1825
$io = new SymfonyStyle($input, $output);
1926
$io->text('Building all Symfony Docs...');
2027

Diff for: components/http_foundation.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,10 @@ Alternatively, if you are serving a static file, you can use a
852852

853853
The ``BinaryFileResponse`` will automatically handle ``Range`` and
854854
``If-Range`` headers from the request. It also supports ``X-Sendfile``
855-
(see for `FrankenPHP`_, `nginx`_ and `Apache`_). To make use of it, you need to determine
856-
whether or not the ``X-Sendfile-Type`` header should be trusted and call
857-
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader`
855+
(see `FrankenPHP X-Sendfile and X-Accel-Redirect headers`_,
856+
`nginx X-Accel-Redirect header`_ and `Apache mod_xsendfile module`_). To make use
857+
of it, you need to determine whether or not the ``X-Sendfile-Type`` header should
858+
be trusted and call :method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader`
858859
if it should::
859860

860861
BinaryFileResponse::trustXSendfileTypeHeader();
@@ -1076,9 +1077,9 @@ Learn More
10761077
/session
10771078
/http_cache/*
10781079

1079-
.. _FrankenPHP: https://frankenphp.dev/docs/x-sendfile/
1080-
.. _nginx: https://mattbrictson.com/blog/accelerated-rails-downloads
1081-
.. _Apache: https://tn123.org/mod_xsendfile/
1080+
.. _`FrankenPHP X-Sendfile and X-Accel-Redirect headers`: https://frankenphp.dev/docs/x-sendfile/
1081+
.. _`nginx X-Accel-Redirect header`: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers
1082+
.. _`Apache mod_xsendfile module`: https://github.com/nmaier/mod_xsendfile
10821083
.. _`JSON Hijacking`: https://haacked.com/archive/2009/06/25/json-hijacking.aspx/
10831084
.. _`valid JSON top-level value`: https://www.json.org/json-en.html
10841085
.. _OWASP guidelines: https://cheatsheetseries.owasp.org/cheatsheets/AJAX_Security_Cheat_Sheet.html#always-return-json-with-an-object-on-the-outside

0 commit comments

Comments
 (0)