Commit 67c61efc authored by catch's avatar catch

Issue #1436814 by gary4gar, kid_icarus, webchick, droplet, andypost: Fixed...

Issue #1436814 by gary4gar, kid_icarus, webchick, droplet, andypost: Fixed Fast 404 'Not found' pages are missing a doctype.
parent 3e854432
...@@ -2564,7 +2564,7 @@ function drupal_fast_404() { ...@@ -2564,7 +2564,7 @@ function drupal_fast_404() {
$fast_paths = variable_get('404_fast_paths', FALSE); $fast_paths = variable_get('404_fast_paths', FALSE);
if ($fast_paths && preg_match($fast_paths, request_path())) { if ($fast_paths && preg_match($fast_paths, request_path())) {
drupal_add_http_header('Status', '404 Not Found'); drupal_add_http_header('Status', '404 Not Found');
$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>'); $fast_404_html = variable_get('404_fast_html', '<!DOCTYPE html><html><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. // Replace @path in the variable with the page path.
print strtr($fast_404_html, array('@path' => check_plain(request_uri()))); print strtr($fast_404_html, array('@path' => check_plain(request_uri())));
exit; exit;
......
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
*/ */
$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//'; $conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
$conf['404_fast_html'] = '<!DOCTYPE html><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>'; $conf['404_fast_html'] = '<!DOCTYPE html><html><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>';
/** /**
* By default, fast 404s are returned as part of the normal page request * By default, fast 404s are returned as part of the normal page request
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment