getValue('LOAD_EXTERNAL_MEDIA') != 'proxy') { throw new AccessDeniedException(); } if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { $modified_since = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']); } ini_set('default_socket_timeout', 5); $this->render_nothing(); //stop output buffering started in Trails\Dispatcher::dispatch() while (ob_get_level()) { ob_end_clean(); } try { $media_proxy->readURL($url, $modified_since); } catch (MediaProxyException $ex) { header($ex->getMessage()); } } }