[BUGFIX] Allow dumping files larger than allowed memory size
The `SelfEmittableLazyOpenStream` class used by FileDumpController uses `readfile` which is meant to be a performant way to send files to the webserver (implemented by PHP in C) and does not count as runtime memory usage (memory_limit) if the output is unbuffered. Make sure to clear any output buffers before emitting self emittable streams in order for PHP to be able to send the files without copying the contents into a temporary buffer (counting towards memory limit). Resolves: #105212 Releases: main, 12.4 Change-Id: I3528f31c099b5d1cd3f8ba287a4eb45955ff3510 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86518 Reviewed-by:Garvin Hicking <gh@faktor-e.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Garvin Hicking <gh@faktor-e.de> Reviewed-by:
Andreas Kienast <akienast@scripting-base.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Andreas Kienast <akienast@scripting-base.de>
Please register or sign in to comment