You are here

function advagg_missing_fast404 in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg.module \advagg_missing_fast404()
  2. 7.2 advagg.missing.inc \advagg_missing_fast404()

Send out a fast 404 and exit.

2 calls to advagg_missing_fast404()
advagg_missing_css in includes/missing.inc
Menu Callback; regenerates a missing css file.
advagg_missing_js in includes/missing.inc
Menu Callback; regenerates a missing js file.

File

./advagg.module, line 2450
Advanced CSS/JS aggregation module

Code

function advagg_missing_fast404($msg = '') {
  global $base_path;
  if (!headers_sent()) {
    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
    header('X-AdvAgg: Failed Validation. ' . $msg);
  }
  print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
  print '<html>';
  print '<head><title>404 Not Found</title></head>';
  print '<body><h1>Not Found</h1>';
  print '<p>The requested URL was not found on this server.</p>';
  print '<p><a href="' . $base_path . '">Home</a></p>';
  print '<!-- advagg_missing_fast404 -->';
  print '</body></html>';
  exit;
}