]> ruin.nu Git - ndwebbie.git/commitdiff
minor change
authorMichael Andreen <harv@ruin.nu>
Wed, 13 Dec 2006 16:40:25 +0000 (16:40 +0000)
committerMichael Andreen <harv@ruin.nu>
Wed, 13 Dec 2006 16:40:25 +0000 (16:40 +0000)
index.pl

index 061cbfa089e6e417b4f3c7a1e35e563380034da1..a78dff374b50b103745d6fd5069ac0bf8b2dc6d1 100755 (executable)
--- a/index.pl
+++ b/index.pl
@@ -73,12 +73,12 @@ if (param('page') =~ /^(main|check|motd|points|covop|top100|launchConfirmation|a
 our $XML = 0;
 $XML = 1 if param('xml') and $page =~ /^(raids)$/;
 
+my $type = 'text/html';
 if ($XML){
-       print header(-type=>'text/xml');
+       $type = 'text/xml';
        $ND::TEMPLATE = HTML::Template->new(filename => "templates/xml.tmpl");
        $ND::BODY = HTML::Template->new(filename => "templates/${page}.xml.tmpl");
 }else{
-       print header;
        $ND::BODY = HTML::Template->new(filename => "templates/${page}.tmpl");
 }
 
@@ -104,7 +104,9 @@ unless ($XML){
 
 }
 $ND::TEMPLATE->param(BODY => $ND::BODY->output);
-print $TEMPLATE->output;
+my $output = $TEMPLATE->output;
+print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
+print $output;
 
 
 $DBH->disconnect;