Patch by Kjartan:

- Fixed the parse errors
 - Send the proper response code to the user
4.2.x
Dries Buytaert 2003-06-02 20:04:40 +00:00
parent 85d22f3e82
commit 1839f42c59
1 changed files with 12 additions and 4 deletions

View File

@ -3,10 +3,18 @@
include_once "includes/common.inc";
$errors = array(500 => "500 error: internal server error", 404 => "404 error: '".`$_SERVER["REDIRECT_URL"] ."' not found", 403 => "403 error: access denied - forbidden", 401 => "401 error: authorization required", 400 => "400 error: bad request");
$errors = array(
500 => "500 error: internal server error",
404 => "404 error: '". $_SERVER["REDIRECT_URL"] ."' not found",
403 => "403 error: access denied - forbidden",
401 => "401 error: authorization required",
400 => "400 error: bad request"
);
watchdog("httpd", $errors[$_SERVER["REDIRECT_STATUS"]);
drupal_goto($base_url);
if ($errors[$_SERVER["REDIRECT_STATUS"]]) {
watchdog("httpd", $errors[$_SERVER["REDIRECT_STATUS"]]);
header("HTTP/1.0 ". $errors[$_SERVER["REDIRECT_STATUS"]]);
}
include_once("$base_url/index.php");
?>