protected function execute() { $storage = new binarypool_storage($this->bucket); $path = $this->getPath(); if (preg_match('#index\\.xml$#', $path) && $this->clientxsl) { ob_start(); $storage->sendFile($path); $content = ob_get_contents(); ob_end_clean(); $pi = '<?xml version="1.0" encoding="UTF-8"?>'; $pi .= '<?xml-stylesheet type="text/xsl" href="/static/xsl/index.xsl"?>'; $content = preg_replace('#<\\?xml version="1.0" encoding="UTF-8"\\?>#', $pi, $content); $this->sendHeaders('text/xml; charset=utf-8'); print $content; } else { $mime = binarypool_mime::getMimeType($storage->absolutize($path)); $this->sendHeaders($mime); $storage->sendFile($path); } $this->ignoreView = true; }