Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.109
diff -u -p -r1.109 .htaccess
--- .htaccess 5 May 2010 06:15:59 -0000 1.109
+++ .htaccess 16 Jul 2010 19:30:39 -0000
@@ -16,12 +16,6 @@ Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
-# Force simple error message for requests for non-existent favicon.ico.
-
The requested URL "@path" was not found on this server.
'); + // Replace @path in the variable with the page path. + print strtr($fast_404_html, array('@path' => check_plain(request_uri()))); + exit; + } +} + +/** * Return TRUE if a Drupal installation is currently being attempted. */ function drupal_installation_attempted() { Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1192 diff -u -p -r1.1192 common.inc --- includes/common.inc 16 Jul 2010 02:37:05 -0000 1.1192 +++ includes/common.inc 16 Jul 2010 19:30:40 -0000 @@ -2392,11 +2392,14 @@ function drupal_deliver_html_page($page_ // @todo: Break these up into separate functions? switch ($page_callback_result) { case MENU_NOT_FOUND: + watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); + + // Check for and return a fast 404 page if configured. + drupal_fast_404(); + // Print a 404 page. drupal_add_http_header('Status', '404 Not Found'); - watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); - // Keep old path for reference, and to allow forms to redirect to it. if (!isset($_GET['destination'])) { $_GET['destination'] = $_GET['q']; @@ -2413,7 +2416,7 @@ function drupal_deliver_html_page($page_ if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) { // Standard 404 handler. drupal_set_title(t('Page not found')); - $return = t('The requested page could not be found.'); + $return = t('The requested page "@path" could not be found.', array('@path' => request_uri())); } drupal_set_page_content($return); Index: modules/locale/locale.test =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v retrieving revision 1.73 diff -u -p -r1.73 locale.test --- modules/locale/locale.test 26 Jun 2010 19:55:47 -0000 1.73 +++ modules/locale/locale.test 16 Jul 2010 19:30:40 -0000 @@ -260,9 +260,8 @@ class LocaleTranslationFunctionalTest ex $this->assertRaw(t('The language %locale has been removed.', array('%locale' => $name)), t('The test language has been removed.')); // Reload to remove $name. $this->drupalGet($path); - $this->assertNoText($langcode, t('Language code not found.')); - $this->assertNoText($name, t('Name not found.')); - $this->assertNoText($native, t('Native not found.')); + // Verify that language is no longer found. + $this->assertResponse(404, t('Language no longer found.')); $this->drupalLogout(); // Delete the string.