X-Git-Url: http://git.i-scream.org/?a=blobdiff_plain;f=cgi-bin%2Fdownload.cgi;h=9ae0bbfab27f075390082fffe3393dc8e7f9690b;hb=8ea93006c49527c3039efd9597e9e07573f16be6;hp=d555c7fdc613eaa01b421738c7c00366b4974d22;hpb=cd95dd29ffb6fd7e70b0ee80e093d973e18e780c;p=www.i-scream.org.git diff --git a/cgi-bin/download.cgi b/cgi-bin/download.cgi index d555c7f..9ae0bbf 100755 --- a/cgi-bin/download.cgi +++ b/cgi-bin/download.cgi @@ -1,11 +1,11 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl #-------------------------------------------------------------- # download.cgi # -# A Perl CGI script that requests a user's email address -# before they may download a build from the i-scream web site. -# It is not essential for them to enter their email address. +# A Perl CGI script that requests some details from the user +# before they download a build from the i-scream web site. +# To assist the paranoid, all fields are optional. # # Copyright Paul Mutton, 2001. #-------------------------------------------------------------- @@ -19,12 +19,12 @@ $| = 1; #-------------------------------------------------------------- # Essential Settings #-------------------------------------------------------------- -my $build_dir = "/builds"; -my $log_file = "download_log"; +my ($build_dir) = "/builds"; +my ($log_file) = "download_log"; #-------------------------------------------------------------- -my $query = new CGI; +my ($query) = new CGI; my ($file_name) = ($query->param('file_name') =~ /^\s*(.*)\s*$/); my ($your_name) = ($query->param('your_name') =~ /^\s*(.*)\s*$/); @@ -47,7 +47,7 @@ if (defined($submit) && $submit eq "Download") { open(LOGFILE, ">>$log_file"); print LOGFILE "$date|$file_name|$your_name|$email_address|$country\n"; close(LOGFILE); - print "Location: $build_dir/$file_name\n\n"; + print $query->redirect("$build_dir/$file_name"); } else { print "Content-type: text/html\n\n";