コミットメタ情報

リビジョンe2c88ccc8992a50fef131dfc5fb62f95e7978e51 (tree)
日時2017-08-23 06:02:56
作者umorigu <umorigu@gmai...>
コミッターumorigu

ログメッセージ

BugTrack/2102 Disable output buffering on sending an file

変更サマリ

差分

--- a/plugin/attach.inc.php
+++ b/plugin/attach.inc.php
@@ -2,7 +2,7 @@
22 // PukiWiki - Yet another WikiWikiWeb clone
33 // attach.inc.php
44 // Copyright
5-// 2003-2016 PukiWiki Development Team
5+// 2003-2017 PukiWiki Development Team
66 // 2002-2003 PANDA <panda@arino.jp> http://home.arino.jp/
77 // 2002 Y.MASUI <masui@hisec.co.jp> http://masui.net/pukiwiki/
88 // 2001-2002 Originally written by yu-ji
@@ -746,7 +746,11 @@ EOD;
746746 . '"; filename*=utf-8\'\'' . rawurlencode($utf8filename));
747747 header('Content-Length: ' . $this->size);
748748 header('Content-Type: ' . $this->type);
749-
749+ // Disable output bufferring
750+ while (ob_get_level()) {
751+ ob_end_flush();
752+ }
753+ flush();
750754 @readfile($this->filename);
751755 exit;
752756 }
--- a/plugin/dump.inc.php
+++ b/plugin/dump.inc.php
@@ -2,7 +2,7 @@
22 // PukiWiki - Yet another WikiWikiWeb clone
33 // dump.inc.php
44 // Copyright
5-// 2004-2016 PukiWiki Development Team
5+// 2004-2017 PukiWiki Development Team
66 // 2004 teanan / Interfair Laboratory
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -204,6 +204,11 @@ function download_tarfile($tempnam, $arc_kind)
204204 header('Content-Length: ' . $size);
205205 header('Content-Type: application/octet-stream');
206206 header('Pragma: no-cache');
207+ // Disable output bufferring
208+ while (ob_get_level()) {
209+ ob_end_flush();
210+ }
211+ flush();
207212 @readfile($tempnam);
208213 }
209214
--- a/plugin/ref.inc.php
+++ b/plugin/ref.inc.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: ref.inc.php,v 1.51 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2002-2006 PukiWiki Developers Team
3+// ref.inc.php
4+// Copyright
5+// 2002-2017 PukiWiki Development Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -430,6 +430,11 @@ function plugin_ref_action()
430430 .'"; filename*=utf-8\'\'' . rawurlencode($utf8filename));
431431 header('Content-Length: ' . $size);
432432 header('Content-Type: ' . $type);
433+ // Disable output bufferring
434+ while (ob_get_level()) {
435+ ob_end_flush();
436+ }
437+ flush();
433438 @readfile($ref);
434439 exit;
435440 }
旧リポジトリブラウザで表示