How to serve up CSL files?

Hello,

It is clearly possible to serve up CSL files, because the Zotero style catalog does just that:

http://www.zotero.org/styles

on the "install" links. However, I cannot get the same thing to work with these two files:

index.html
=========
<html>
<head>
<title>TEST TEST TEST of CSL install</title>
</head>
<body>
<p>
<a href="install.php?style=sei-harvard-chicago">Install SEI US House Style for Zotero</a>
</p>
</body>
</html>
=======

install.php
=========
<?php
if ($_GET['style']) {
$file = $_GET['style'] . '.csl';
header("Content-disposition: attachment; filename=$file");
header('Content-type: text/x-csl');
readfile($file);
}
?>
=========

Rather than installing, it offers to download it.

Can anyone tell me what the <Install> link is doing beyond serving up the document as MIME type test/x-csl? (Or what I'm doing wrong when I try to serve it up?)

Thanks,
Eric
Sign In or Register to comment.