From 63c3470dff11ddf4a9a16bc751b35e5f3313b867 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 26 Jun 2013 11:53:50 -0500 Subject: [PATCH] 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 --- include/class.file.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/class.file.php b/include/class.file.php index 6908dd8ee..dcfc1e8d1 100644 --- a/include/class.file.php +++ b/include/class.file.php @@ -96,6 +96,7 @@ class AttachmentFile { } function sendData() { + @ini_set('zlib.output_compression', 'Off'); $file = $this->open(); while ($chunk = $file->read()) echo $chunk; -- GitLab