Skip to content

Commit 4ec843f

Browse files
committed
Add note about buffering in StreamedResponse.
1 parent 3e6be25 commit 4ec843f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/http_foundation/introduction.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,18 @@ represented by a PHP callable instead of a string::
387387
});
388388
$response->send();
389389

390+
.. note::
391+
392+
The ``flush()`` function does not flush bufferring. So if
393+
``ob_start()`` has been called before or php.ini option
394+
``output_buffering`` is not disabled (which is on some
395+
installations by default), you have to call ``ob_flush()`` before
396+
``flush()``.
397+
398+
But not only php can buffer output. Your web-server can also do
399+
it. Even more, if you use fastcgi, buffering can't be disabled at
400+
all.
401+
390402
Downloading Files
391403
~~~~~~~~~~~~~~~~~
392404

0 commit comments

Comments
 (0)