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:
parent
7d2e4100f3
commit
9a3054ffc8
1 changed files with 17 additions and 22 deletions
|
@ -161,20 +161,18 @@ sub output_page
|
|||
|
||||
if($param_xslt eq "null")
|
||||
{
|
||||
$output = $parser->parse_string(
|
||||
XMLout(
|
||||
$page,
|
||||
KeyAttr => {},
|
||||
RootName => 'page',
|
||||
AttrIndent => '1'
|
||||
)
|
||||
);
|
||||
return $session->header(
|
||||
-type=>'application/xml',
|
||||
-charset=>'UTF-8',
|
||||
-cookie=>@cookies
|
||||
),
|
||||
$output->toString;
|
||||
$parser->parse_string(
|
||||
XMLout(
|
||||
$page,
|
||||
KeyAttr => {},
|
||||
RootName => 'page'
|
||||
)
|
||||
)->toString;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -197,8 +195,7 @@ sub output_page
|
|||
XMLout(
|
||||
$page,
|
||||
KeyAttr => {},
|
||||
RootName => 'page',
|
||||
AttrIndent => '1'
|
||||
RootName => 'page'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -206,27 +203,25 @@ sub output_page
|
|||
if($param_xslt eq "xspf")
|
||||
{
|
||||
return $session->header(
|
||||
-type=>'application/xspf+xml',
|
||||
-charset=>'UTF-8',
|
||||
-type=>$stylesheet->media_type,
|
||||
-charset=>$stylesheet->output_encoding,
|
||||
-attachment=>$query->param('query').".xspf",
|
||||
-cookie=>@cookies
|
||||
),
|
||||
$output->toString;
|
||||
}
|
||||
elsif($param_xslt eq "rss")
|
||||
elsif($param_xslt eq "pr0n")
|
||||
{
|
||||
return $session->header(
|
||||
-type=>'application/rss+xml',
|
||||
-charset=>'UTF-8',
|
||||
-cookie=>@cookies
|
||||
),
|
||||
$output->toString;
|
||||
-status=>'402 Payment required',
|
||||
-cost=>'$9000.00',
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
return $session->header(
|
||||
-type=>'application/xhtml+xml',
|
||||
-charset=>'UTF-8',
|
||||
-type=>$stylesheet->media_type,
|
||||
-charset=>$stylesheet->output_encoding,
|
||||
-cookie=>@cookies
|
||||
),
|
||||
$output->toString;
|
||||
|
|
Loading…
Reference in a new issue