From 71e7d46e6705a79ad451b201d45841a5b80c6f65 Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Thu, 3 Nov 2016 21:15:08 +0700 Subject: [PATCH] Fix issue #1259: Zip on-the-fly option creates 0-sized empty files (apache compatibility) --- core/src/plugins/access.fs/FsAccessDriver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/plugins/access.fs/FsAccessDriver.php b/core/src/plugins/access.fs/FsAccessDriver.php index f13d94bc88..3399ea9682 100644 --- a/core/src/plugins/access.fs/FsAccessDriver.php +++ b/core/src/plugins/access.fs/FsAccessDriver.php @@ -662,6 +662,7 @@ public function downloadAction(ServerRequestInterface &$request, ResponseInterfa if ($this->getContextualOption($ctx, "ZIP_ON_THE_FLY")) { // Make a zip on the fly and send stream as download $response = HTMLWriter::responseWithAttachmentsHeaders($response, $localName, null, false, false); + $response = $response->withoutHeader("Content-Length"); $asyncReader = new \Pydio\Core\Http\Response\AsyncResponseStream(function () use ($selection, $dir) { session_write_close(); restore_error_handler();