From 4ec843febc2a99e98871e8f6536e80b98c2e229f Mon Sep 17 00:00:00 2001 From: Pavel Volokitin Date: Sun, 31 Mar 2013 00:16:21 +0600 Subject: [PATCH] Add note about buffering in StreamedResponse. --- components/http_foundation/introduction.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index a75777f7798..4b088494788 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -387,6 +387,18 @@ represented by a PHP callable instead of a string:: }); $response->send(); +.. note:: + + The ``flush()`` function does not flush bufferring. So if + ``ob_start()`` has been called before or php.ini option + ``output_buffering`` is not disabled (which is on some + installations by default), you have to call ``ob_flush()`` before + ``flush()``. + + But not only php can buffer output. Your web-server can also do + it. Even more, if you use fastcgi, buffering can't be disabled at + all. + Downloading Files ~~~~~~~~~~~~~~~~~