Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 2ca6d9f

Browse files
committed
Merge branch 'develop' of https://github.com/blackwarthog/pydio-core into blackwarthog-develop
2 parents 09abbd9 + 112c763 commit 2ca6d9f

File tree

5 files changed

+164
-43
lines changed

5 files changed

+164
-43
lines changed

core/src/core/classes/class.HTMLWriter.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ public static function generateAttachmentsHeader(&$attachmentName, $dataSize, $i
170170
if ($gzip) {
171171
header("Content-Encoding: gzip");
172172
}
173-
header("Content-Length: ".$dataSize);
174-
if ($isFile && ($dataSize != 0)) {
175-
header("Content-Range: bytes 0-" . ($dataSize- 1) . "/" . $dataSize . ";");
173+
if ($dataSize >= 0) {
174+
header("Content-Length: ".$dataSize);
175+
if ($isFile && ($dataSize != 0)) {
176+
header("Content-Range: bytes 0-" . ($dataSize- 1) . "/" . $dataSize . ";");
177+
}
176178
}
177179
header("Content-Disposition: attachment; filename=\"".$attachmentName."\"");
178180
header("Expires: 0");

0 commit comments

Comments
 (0)