]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/backup.cgi
backup.cgi: Read and deliver the requested backup in pieces
[ipfire-2.x.git] / html / cgi-bin / backup.cgi
index 1c01cb286f97e5a129e7d1c3372518b86c21c141..3888ccbff92e463d0041c9d3e3d8d8edd448e548 100644 (file)
@@ -366,6 +366,13 @@ sub deliver_file() {
 
        # Deliver content
        open(FILE, "<$file") or die "Unable to open $file: $!";
-       print <FILE>;
+
+       # Read the file line by line and send it
+       # to the client.
+       while (<FILE>) {
+               print $_;
+       }
+
+       # Close file handle.
        close(FILE);
 }