Skip to content
Snippets Groups Projects
Commit 63c3470d authored by Jared Hancock's avatar Jared Hancock
Browse files

Force output_compression Off for downloads

Looks like a long standing, yet-to-be-fixed PHP bug, where
zlib.output_compression can result in the output buffer not completely being
flushed. This is especially critical for downloads where the tail of the
file might be lost.

https://bugs.php.net/bug.php?id=19436
parent fdfba0ec
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,7 @@ class AttachmentFile {
}
function sendData() {
@ini_set('zlib.output_compression', 'Off');
$file = $this->open();
while ($chunk = $file->read())
echo $chunk;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment