Siechfred: Problem beim Dateidownload

Beitrag lesen

Hallo Forum,

ich habe ein kleines Download-Problem. Wenn man hier: http://www.siechfreds-welt.de/functions.html ganz unten auf den Download-Button klickt, wird mir beim dann folgenden Speichern-Dialog als Dateiendung immer ein .pl angehängt, obwohl die Datei eigentlich auf .html endet. Die entsprechende Subroutine sieht so aus:

sub dl_file {
  @data = stat("$path_file");
  print "Content-Type: application/octet-stream;\n";
  print "Content-Length: $data[7];\n";
  print "Content-Disposition: filename="$file"\n\n";
  open (FILE,"<$path_file");
  binmode(FILE);
  binmode(STDOUT);
  while(defined($outfile = <FILE>)) {
    print "$outfile";
  };
  close(FILE);
  chdir($path);
  unlink($file);
}

Fehlt da vielleicht noch irgendeine Angabe? Der Vollständigkeit halber: In $file steht "12345678.html", in $path_file "../data/12345678.html", in $path "../data".

hasta luego
Torsten

--
Opinions are like assholes: everybody has one.
ss:| zu:| ls:# fo:| de:[ va:| ch:? n4:& rl:? br:& js:| ie:% fl:( mo:}