get mime types from xsl

git-svn-id: http://yolanda.mister-muffin.de/svn@254 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2008-03-10 15:44:46 +00:00
parent 7d2e4100f3
commit 9a3054ffc8

View file

@ -160,21 +160,19 @@ sub output_page
$param_xslt =~ s/[^\w]//gi; $param_xslt =~ s/[^\w]//gi;
if($param_xslt eq "null") if($param_xslt eq "null")
{ {
$output = $parser->parse_string(
XMLout(
$page,
KeyAttr => {},
RootName => 'page',
AttrIndent => '1'
)
);
return $session->header( return $session->header(
-type=>'application/xml', -type=>'application/xml',
-charset=>'UTF-8', -charset=>'UTF-8',
-cookie=>@cookies -cookie=>@cookies
), ),
$output->toString; $parser->parse_string(
XMLout(
$page,
KeyAttr => {},
RootName => 'page'
)
)->toString;
} }
else else
{ {
@ -197,8 +195,7 @@ sub output_page
XMLout( XMLout(
$page, $page,
KeyAttr => {}, KeyAttr => {},
RootName => 'page', RootName => 'page'
AttrIndent => '1'
) )
) )
); );
@ -206,27 +203,25 @@ sub output_page
if($param_xslt eq "xspf") if($param_xslt eq "xspf")
{ {
return $session->header( return $session->header(
-type=>'application/xspf+xml', -type=>$stylesheet->media_type,
-charset=>'UTF-8', -charset=>$stylesheet->output_encoding,
-attachment=>$query->param('query').".xspf", -attachment=>$query->param('query').".xspf",
-cookie=>@cookies -cookie=>@cookies
), ),
$output->toString; $output->toString;
} }
elsif($param_xslt eq "rss") elsif($param_xslt eq "pr0n")
{ {
return $session->header( return $session->header(
-type=>'application/rss+xml', -status=>'402 Payment required',
-charset=>'UTF-8', -cost=>'$9000.00',
-cookie=>@cookies )
),
$output->toString;
} }
else else
{ {
return $session->header( return $session->header(
-type=>'application/xhtml+xml', -type=>$stylesheet->media_type,
-charset=>'UTF-8', -charset=>$stylesheet->output_encoding,
-cookie=>@cookies -cookie=>@cookies
), ),
$output->toString; $output->toString;