Skip to content

Commit c42f640

Browse files
committed
minor #8132 Added a note about disabling FastCGI buffering in Nginx (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Added a note about disabling FastCGI buffering in Nginx This fixes #4155. Commits ------- 58ba38f Added a note about disabling FastCGI buffering in Nginx
2 parents b268c7a + 58ba38f commit c42f640

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/http_foundation.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,12 @@ represented by a PHP callable instead of a string::
468468
you must call ``ob_flush()`` before ``flush()``.
469469

470470
Additionally, PHP isn't the only layer that can buffer output. Your web
471-
server might also buffer based on its configuration. What's more, if you
472-
use FastCGI, buffering can't be disabled at all.
471+
server might also buffer based on its configuration. Some servers, such as
472+
Nginx, let you disable buffering at config level or adding a special HTTP
473+
header in the response::
474+
475+
// disables FastCGI buffering in Nginx only for this response
476+
$response->headers->set('X-Accel-Buffering', 'no')
473477

474478
.. _component-http-foundation-serving-files:
475479

0 commit comments

Comments
 (0)