cvs: phpweb /error index.php
| From: | Rasmus Lerdorf | Date: | Sun, 25 May 2003 17:42:06 +0000 |
| Subject: | cvs: phpweb /error index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-18088@lists.php.net to get a copy of this message | ||
rasmus Sun May 25 13:42:06 2003 EDT
Modified files:
/phpweb/error index.php
Log:
Attempt to fix bogus response codes for mirrors running older php versions
Index: phpweb/error/index.php
diff -u phpweb/error/index.php:1.120 phpweb/error/index.php:1.121
--- phpweb/error/index.php:1.120 Sun May 25 13:33:43 2003
+++ phpweb/error/index.php Sun May 25 13:42:06 2003
@@ -1,6 +1,6 @@
<?php
-// $Id: index.php,v 1.120 2003/05/25 17:33:43 rasmus Exp $
+// $Id: index.php,v 1.121 2003/05/25 17:42:06 rasmus Exp $
/*
@@ -53,6 +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('HTTP/1.1 200 OK');
@header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
@@ -63,6 +64,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('HTTP/1.1 200 OK');
@header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
include "$DOCUMENT_ROOT/manual/$parts[1]/$parts[2].php";
@@ -72,6 +74,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('HTTP/1.1 200 OK');
@header('Status: 200 OK',1,200);
$PRINT_PAGE = TRUE;
if ($parts[2] == "printwn") { $PRINT_NOTES = TRUE; }
@@ -207,6 +210,7 @@
include_once "manual-lookup.inc";
$try = find_manual_page($LANG, $URI);
if ($try) {
+ @header('HTTP/1.1 200 OK');
@header('Status: 200 OK',1,200);
include_once $_SERVER['DOCUMENT_ROOT'] . $try;
exit;
@@ -224,6 +228,7 @@
function make404()
{
global $_SERVER;
+ @header('HTTP/1.1 404 Not Found');
@header('Status: 404 Not Found',1,404);
header("Cache-Control: public, max-age=600");
commonHeader('404 Not Found');