Hi Garvin
I now tried around a lot with this behaviour, even with creating all output in an external_plugin hook.
Its still the same, while it depends on
echo $output. If you echo something, you get this start behaviour of templates entries.tpl. So its not recommended to do downloading content via generate string (like my try) or fopen/fread file functions, even within an external_plugin hook, while you need echo $content.
So I came around doing it this way, which is working as expected:
Code: Select all
case 'dl':
if($wcal === true) {
$url = $_SERVER['HTTP_HOST'] . $serendipity['serendipityHTTPPath'] . 'uploads/icalendar.ics';
if (serendipity_isResponseClean($url)) {
header('Status: 302 Found');
header('Location: http://' . $url);
}
}
break;
Btw, crawling the web I found an interesting article about HTTP_HOST vs SERVER_NAME:
http://shiflett.org/blog/2006/mar/serve ... -http-host
and
http://seancoates.com/xss-woes
Does this effect Serendipity somewhere?
Regards,
Ian