1<?php 2/** 3 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 4 * @author Andreas Gohr <gohr@cosmocode.de> 5 */ 6 7if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../').'/'); 8define('NOSESSION',true); 9require_once(DOKU_INC.'inc/init.php'); 10require_once(DOKU_INC.'inc/pageutils.php'); 11require_once(DOKU_INC.'inc/io.php'); 12 13$xmlid = $_REQUEST['xmlid']; 14$cache = getcachename($xmlid,'graphgear'); 15$time = @filemtime($cache); 16if(!$time){ 17 header("HTTP/1.0 404 Not Found"); 18 echo 'Not Found'; 19 exit; 20} 21 22header('Content-Type: text/xml; charset=utf-8'); 23header('Expires: '.gmdate("D, d M Y H:i:s", time()+max($conf['cachetime'], 3600)).' GMT'); 24header('Cache-Control: public, proxy-revalidate, no-transform, max-age='.max($conf['cachetime'], 3600)); 25header('Pragma: public'); 26http_conditionalRequest($time); 27echo io_readFile($cache); 28 29//Setup VIM: ex: et ts=4 enc=utf-8 : 30