#!/usr/bin/perl
#
  do "acqPATHs.pl";
  $str = $ENV{"QUERY_STRING"};
  ($dir, $fnm) = split(/\+/, $str);
  if ($dir ne "") { $dir .= "/"; }
  $path = "$DATAPATH/$dir$fnm";
  if (open(IN, "< $path")) {
    print "Content-type: application/force-download;\n";
    print 'Content-disposition: attachment; filename="'.$fnm.'"'."\n";
    print "Content-type: application/force-download;\n\n";
    while ($buf = <IN>) { print $buf; }
    close(IN);
    exit(0);
  } else {
    print STDERR "dnload2: target file open fail\n";
  }
