diff options
Diffstat (limited to 'sitesummary-collector.cgi')
-rw-r--r-- | sitesummary-collector.cgi | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sitesummary-collector.cgi b/sitesummary-collector.cgi index 778e85c..fa47e08 100644 --- a/sitesummary-collector.cgi +++ b/sitesummary-collector.cgi @@ -25,14 +25,12 @@ if (exists $ENV{REQUEST_METHOD} && $ENV{REQUEST_METHOD} ne "POST") my @entry; if (exists $ENV{CONTENT_TYPE} && $ENV{CONTENT_TYPE} =~ m%multipart/form-data%){ my $query = new CGI; - my $fh = $query->upload("popcondata"); + my $fh = $query->upload("sitesummary"); if ($fh) { - my $filename = $query->param("popcondata"); + my $filename = $query->param("sitesummary"); my $type = $query->uploadInfo($filename)->{'Content-Type'}; - if ("text/plain; charset=utf-8" ne $type && - "application/octet-stream" ne $type) { # Used by ubuntu script - print "Only 'text/plain; charset=utf-8' and 'application/octet-stream -' is supported (not $type)!"; + if ("application/octet-stream" ne $type) { + print "Only 'application/octet-stream' is supported (not $type)!"; die; } else { my $encoding = $query->uploadInfo($filename)->{'Content-Encoding'}; @@ -60,7 +58,10 @@ Unsupported submission method. EOF } -open(SITESUMMARY, "$basedir/storage") or die "Unable to write to storage"; +my $ip "127.0.0.1"; +my $timestamp = "2006-08-25T11:30:30"; + +open(SITESUMMARY, "$basedir/tmpstorage/storage-$ip-$timestamp") or die "Unable to write to storage"; print SITESUMMARY @entry; close SITESUMMARY; |