This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, master has been updated
via 98e8c7b563dcede542b9c78ceed2e279c2358abc (commit)
from 339dbffc70042b8415d4407f35dc008fc9e51ecb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 98e8c7b563dcede542b9c78ceed2e279c2358abc
Author: Jan Paul Tuecking <earl(a)ipfire.org>
Date: Fri Apr 15 02:26:16 2011 +0200
backup.cgi: Added Content-Length to show file status during download.
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/backup.cgi | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Difference in files:
diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi
index fdcac53..8c93814 100644
--- a/html/cgi-bin/backup.cgi
+++ b/html/cgi-bin/backup.cgi
@@ -66,6 +66,8 @@ if ( $cgiparams{'ACTION'} eq "download" )
open(DLFILE, "</var/ipfire/backup/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
my @fileholder = <DLFILE>;
print "Content-Type:application/x-download\n";
+ my @fileinfo = stat("/var/ipfire/backup/$cgiparams{'FILE'}");
+ print "Content-Length:$fileinfo[7]\n";
print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n";
print @fileholder;
exit (0);
@@ -75,6 +77,8 @@ if ( $cgiparams{'ACTION'} eq "downloadiso" )
open(DLFILE, "</var/tmp/backupiso/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
my @fileholder = <DLFILE>;
print "Content-Type:application/x-download\n";
+ my @fileinfo = stat("/var/tmp/backupiso/$cgiparams{'FILE'}");
+ print "Content-Length:$fileinfo[7]\n";
print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n";
print @fileholder;
exit (0);
@@ -84,6 +88,8 @@ if ( $cgiparams{'ACTION'} eq "downloadaddon" )
open(DLFILE, "</var/ipfire/backup/addons/backup/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
my @fileholder = <DLFILE>;
print "Content-Type:application/x-download\n";
+ my @fileinfo = stat("/var/ipfire/backup/addons/backup/$cgiparams{'FILE'}");
+ print "Content-Length:$fileinfo[7]\n";
print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n";
print @fileholder;
exit (0);
hooks/post-receive
--
IPFire 2.x development tree