You are here

function esi_fast404 in ESI: Edge Side Includes 6.2

Generate a fast 404

Return value

Blank page.

2 calls to esi_fast404()
esi__block_handler in ./esi.module
Menu handler for ESIs
esi__panel_pane_handler in ./esi.module
Menu handler to serve individual panel-panes via ESI.

File

./esi.module, line 723
Adds support for ESI (Edge-Side-Include) integration, allowing blocks to be\ delivered by ESI, with support for per-block cache times.

Code

function esi_fast404($msg = '') {
  global $base_path;
  if (!headers_sent()) {
    drupal_set_header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
    drupal_set_header('X-ESI: Failed To Render. ' . $msg);
  }
  $output = '';

  //   $output .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
  //   $output .= '<html>';
  //   $output .= '<head><title>404 Not Found</title></head>';
  //   $output .= '<body><h1>Not Found</h1>';
  //   $output .= '<p>The requested URL was not found on this server.</p>';
  //   $output .= '<p><a href="' . $base_path . '">Home</a></p>';
  $output .= '<!-- esi_fast404 -->';

  //   $output .= '</body></html>';
  return $output;
}