diff options
| author | Petter Reinholdtsen <pere@hungry.com> | 2006-08-25 15:21:17 +0000 | 
|---|---|---|
| committer | Petter Reinholdtsen <pere@hungry.com> | 2006-08-25 15:21:17 +0000 | 
| commit | 080b37d0ed5d04702452743bbeb7ae38a7f3d415 (patch) | |
| tree | 8f37f53d8d7b91db90ebd4ec07129457b0738d14 /sitesummary-collector.cgi | |
| parent | 066354fec00687bc2325ae58963b7df2816caa01 (diff) | |
| download | sitesummary-080b37d0ed5d04702452743bbeb7ae38a7f3d415.tar.gz sitesummary-080b37d0ed5d04702452743bbeb7ae38a7f3d415.tar.bz2 sitesummary-080b37d0ed5d04702452743bbeb7ae38a7f3d415.tar.xz | |
More work on the server.  Make gpg encryption optional for now, as it does not work.
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; | 
