cvs: phpweb /error index.php
| From: | Rasmus Lerdorf | Date: | Sun, 25 May 2003 17:18:31 +0000 |
| Subject: | cvs: phpweb /error index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-18081@lists.php.net to get a copy of this message | ||
rasmus Sun May 25 13:18:31 2003 EDT
Modified files:
/phpweb/error index.php
Log:
Someone broke BC and a status: header liune is not automatically parsed
to set r->status, so we have to pass it in now. Without this change were
were sending both a 404 and a 200 on the same response which caused all
sorts of weirdness. Hopefully this won't break too many mirrors.
Index: phpweb/error/index.php
diff -u phpweb/error/index.php:1.118 phpweb/error/index.php:1.119
--- phpweb/error/index.php:1.118 Sat May 24 15:50:37 2003
+++ phpweb/error/index.php Sun May 25 13:18:30 2003
@@ -1,6 +1,6 @@
<?php
-// $Id: index.php,v 1.118 2003/05/24 19:50:37 goba Exp $
+// $Id: index.php,v 1.119 2003/05/25 17:18:30 rasmus Exp $
/*
@@ -53,7 +53,7 @@
// We need to override the 404 status in these cases too.
if (preg_match("!^manual/(\\w+)/(print|printwn)/(.+\\.php)$!", $URI, $parts) &&
@file_exists("$DOCUMENT_ROOT/manual/$parts[1]/$parts[3]")) {
- header('Status: 200 OK');
+ header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
include "$DOCUMENT_ROOT/manual/$parts[1]/$parts[3]";
@@ -63,7 +63,7 @@
// BC: for old HTML directory (.html extension was used in that)
elseif (preg_match("!^manual/(\\w+)/html/(.+)\\.(html|php)$!", $URI, $parts) &&
@file_exists("$DOCUMENT_ROOT/manual/$parts[1]/$parts[2].php")) {
- header('Status: 200 OK');
+ header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
include "$DOCUMENT_ROOT/manual/$parts[1]/$parts[2].php";
exit;
@@ -72,7 +72,7 @@
// The index file needs to be handled in a special way
elseif (preg_match("!^manual/(\\w+)/(print|printwn|html)(/)?$!", $URI, $parts) &&
@file_exists("$DOCUMENT_ROOT/manual/$parts[1]/index.php")) {
- header('Status: 200 OK');
+ header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
include "$DOCUMENT_ROOT/manual/$parts[1]/index.php";
@@ -207,7 +207,7 @@
include_once "manual-lookup.inc";
$try = find_manual_page($LANG, $URI);
if ($try) {
- header('Status: 200 OK');
+ header('Status: 200 OK',1,200);
include_once $_SERVER['DOCUMENT_ROOT'] . $try;
exit;
}
@@ -224,7 +224,7 @@
function make404()
{
global $_SERVER;
- header('Status: 404 Not Found');
+ header('Status: 404 Not Found',1,404);
header("Cache-Control: public, max-age=600");
commonHeader('404 Not Found');
echo "<h1>Not Found</h1>\n",