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}, USER_AGENT => $ENV{HTTP_USER_AGENT});
+ $page = ND::Web::Page->new(PAGE => $page, DBH => $ND::DBH, URI => $ENV{REQUEST_URI}, USER_AGENT => $ENV{HTTP_USER_AGENT}, HTTP_ACCEPT => $ENV{HTTP_ACCEPT});
$page->render;
$ND::DBH->rollback unless $ND::DBH->{AutoCommit};
$self->process;
- my $type = 'application/xhtml+xml';
- $type = 'text/html' if $self->{USER_AGENT} =~ /MSIE/;
+ my $type = 'text/html';
+ if ($self->{HTTP_ACCEPT} =~ m{application/xhtml\+xml}){
+ $type = 'application/xhtml+xml'
+ }
my $body;
if ($self->{XML}){
$type = 'text/xml';
my ($css) = $DBH->selectrow_array(q{SELECT css FROM users WHERE uid = $1},undef,$ND::UID);
$template->param(CSS => $css);
$template->param(TITLE => $self->{TITLE});
-
}
$template->param(Error => $ND::ERROR);
$template->param(BODY => $body->output);
#
DocumentRoot "/var/www/ndawn/htdocs"
+ DeflateFilterNote ratio
+ AddOutputFilterByType DEFLATE text/*
+ AddOutputFilterByType DEFLATE application/xhtml+xml
+ AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
+
+
#
# This should be changed to whatever you set DocumentRoot to.
#