mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Improve speed of downloading files from webmin by using a 1MB buffer
This commit is contained in:
@@ -53,8 +53,8 @@ if ($ENV{'PATH_INFO'}) {
|
||||
print "Content-type: application/zip\n\n";
|
||||
open(FILE, $temp);
|
||||
unlink($temp);
|
||||
while(<FILE>) {
|
||||
print $_;
|
||||
while(read(FILE, $buffer, 1000000)) {
|
||||
print("$buffer");
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
@@ -83,8 +83,8 @@ if ($ENV{'PATH_INFO'}) {
|
||||
@st = stat($file);
|
||||
print "Content-length: $st[7]\n";
|
||||
print "Content-type: $type\n\n";
|
||||
while(<FILE>) {
|
||||
print $_;
|
||||
while(read(FILE, $buffer, 1000000)) {
|
||||
print("$buffer");
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user