Thread mod_perl-Header-Problem: Content-Type doppelt?!!! (33 answers)
Opened by Froschpopo at 2004-03-16 02:10

Froschpopo
 2004-03-16 14:36
#30643 #30643
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
ich verstehe aber eines noch nicht und darauf habe ich bisher keine Antwort bekommen:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sub tmpl {
my $usrid = get_my_userid();
my $text;
local $/;
local *D;
my ($dat, $hashref) = @_;
open(D, $_[0]) || die $!;
$text = <D>;
close(D);
$hashref->{sid} = $sessionid unless $hashref->{sid};
$hashref->{username} = $usrid;
chop($text);
$text =~ s{ %% ( .*? ) %% }
{ exists( $hashref->{$1} )
? $hashref->{$1}
: ""
}gsex;
return "Content-Type: text/html\n\n$text" if $hashref->{header} == 1;
return $text;
}
print tmpl('/usr/local.../page', {header=>1});

WARUM will Konqueror das Script runterladen wenn angeblich ein Header gesetzt wurde?

View full thread mod_perl-Header-Problem: Content-Type doppelt?!!!