Export downloaded modules faster

This commit is contained in:
Jamie Cameron
2018-10-08 22:21:06 +00:00
parent 70d2e6f364
commit 11acdaa66d
2 changed files with 7 additions and 5 deletions

View File

@@ -29,9 +29,10 @@ if ($in{'to'} == 0) {
# Output the file
print "Content-type: application/octet-stream\n\n";
open(TEMP, $temp);
while(<TEMP>) {
print $_;
}
my $buf;
while(read(TEMP, $buf, 32768)) {
print $buf;
}
close(TEMP);
unlink($temp);
}

View File

@@ -27,8 +27,9 @@ if ($in{'to'} == 0) {
# Output the file
print "Content-type: application/x-gzip\n\n";
open(TEMP, $temp);
while(<TEMP>) {
print $_;
my $buf;
while(read(TEMP, $buf, 32768)) {
print $buf;
}
close(TEMP);
unlink($temp);