$fast_404_html=variable_get('404_fast_html','<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>');
// Replace @path in the variable with the page path.
@@ -2655,41 +2679,44 @@ function request_path() {
return$path;
}
if(isset($_GET['q'])){
// This is a request with a ?q=foo/bar query string. $_GET['q'] is
// overwritten in drupal_path_initialize(), but request_path() is called
// very early in the bootstrap process, so the original value is saved in
// $path and returned in later calls.
$path=$_GET['q'];
}
elseif(isset($_SERVER['REQUEST_URI'])){
// This request is either a clean URL, or 'index.php', or nonsense.
@@ -2530,7 +2496,7 @@ function drupal_deliver_page($page_callback_result, $default_delivery_callback =
// If a delivery callback is specified, but doesn't exist as a function,
// something is wrong, but don't print anything, since it's not known
// what format the response needs to be in.
watchdog('delivery callback not found','callback %callback not found: %q.',array('%callback'=>$delivery_callback,'%q'=>$_GET['q']),WATCHDOG_ERROR);
watchdog('delivery callback not found','callback %callback not found: %path.',array('%callback'=>$delivery_callback,'%path'=>current_path()),WATCHDOG_ERROR);
}
}
@@ -2571,18 +2537,18 @@ function drupal_deliver_html_page($page_callback_result) {
// Print a 404 page.
drupal_add_http_header('Status','404 Not Found');
watchdog('page not found',check_plain($_GET['q']),NULL,WATCHDOG_WARNING);
watchdog('page not found',check_plain(current_path()),NULL,WATCHDOG_WARNING);
// Check for and return a fast 404 page if configured.
drupal_fast_404();
// Keep old path for reference, and to allow forms to redirect to it.