Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
* 2.7:
  Adding information about empty files sent using BinaryFileResponse.
  • Loading branch information
weaverryan committed Oct 15, 2015
2 parents 2255de7 + 141caa2 commit 676c75f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,13 @@ It is possible to delete the file after the request is sent with the
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
Please note that this will not work when the ``X-Sendfile`` header is set.

.. note::

If you *just* created the file during this same request, the file *may* be sent
without any content. This may be due to cached file stats that return zero for
the size of the file. To fix this issue, call ``clearstatcache(false, $file)``
with the path to the binary file.

.. _component-http-foundation-json-response:

Creating a JSON Response
Expand Down

0 comments on commit 676c75f

Please sign in to comment.