]> ruin.nu Git - ndwebbie.git/commitdiff
serve as text/html for msie
authorMichael Andreen <harv@ruin.nu>
Sun, 21 Jan 2007 12:43:26 +0000 (12:43 +0000)
committerMichael Andreen <harv@ruin.nu>
Sun, 21 Jan 2007 12:43:26 +0000 (12:43 +0000)
ND.pm
ND/Web/XMLPage.pm

diff --git a/ND.pm b/ND.pm
index 28bd90ea0a177f5281b9deddd327cd33ec2f4810..757108b7a76b0b42c17339192c15a4f7c1693748 100755 (executable)
--- a/ND.pm
+++ b/ND.pm
@@ -43,7 +43,7 @@ sub handler {
        if ($ENV{'SCRIPT_NAME'} =~ /(\w+)(\.(pl|php|pm))?$/){
                $page = $1 unless $1 eq 'index' and $3 eq 'pl';
        }
-       $page = ND::Web::Page->new(PAGE => $page, DBH => $ND::DBH, URI => $ENV{REQUEST_URI});
+       $page = ND::Web::Page->new(PAGE => $page, DBH => $ND::DBH, URI => $ENV{REQUEST_URI}, USER_AGENT => $ENV{HTTP_USER_AGENT});
        $page->render;
 
        $ND::DBH->rollback unless $ND::DBH->{AutoCommit};
index f2353f4c0d2e8487d12bff8c313217e06268bcf9..68fd96b246b078f333d9dcd770fc4a432a0c26df 100644 (file)
@@ -80,6 +80,7 @@ sub render : method {
        $self->process;
 
        my $type = 'application/xhtml+xml';
+       $type = 'text/html' if $self->{USER_AGENT} =~ /MSIE/;
        my $body;
        if ($self->{XML}){
                $type = 'text/xml';