cvs: phpweb /include do-download.inc errors.inc
| From: | Hannes Magnusson | Date: | Tue, 19 Sep 2006 15:41:49 +0000 |
| Subject: | cvs: phpweb /include do-download.inc errors.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32730@lists.php.net to get a copy of this message | ||
bjori Tue Sep 19 15:41:49 2006 UTC
Modified files:
/phpweb/include do-download.inc errors.inc
Log:
Force correct status code (bug#36440)
http://cvs.php.net/viewvc.cgi/phpweb/include/do-download.inc?r1=1.8&r2=1.9&diff_format=u
Index: phpweb/include/do-download.inc
diff -u phpweb/include/do-download.inc:1.8 phpweb/include/do-download.inc:1.9
--- phpweb/include/do-download.inc:1.8 Fri Aug 27 20:33:31 2004
+++ phpweb/include/do-download.inc Tue Sep 19 15:41:49 2006
@@ -1,6 +1,6 @@
<?php
-// $Id: do-download.inc,v 1.8 2004/08/27 20:33:31 goba Exp $
+// $Id: do-download.inc,v 1.9 2006/09/19 15:41:49 bjori Exp $
/*
This code redirects the user to the exact file to
@@ -64,6 +64,7 @@
// Redirect to the particular file
if (!headers_sent()) {
+ status_header(302);
header('Location: ' . $mirror . 'distributions/' . $found);
} else {
exit("Unable to serve you the requested file for download");
http://cvs.php.net/viewvc.cgi/phpweb/include/errors.inc?r1=1.5&r2=1.6&diff_format=u
Index: phpweb/include/errors.inc
diff -u phpweb/include/errors.inc:1.5 phpweb/include/errors.inc:1.6
--- phpweb/include/errors.inc:1.5 Sat Aug 14 15:02:46 2004
+++ phpweb/include/errors.inc Tue Sep 19 15:41:49 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: errors.inc,v 1.5 2004/08/14 15:02:46 goba Exp $
+// $Id: errors.inc,v 1.6 2006/09/19 15:41:49 bjori Exp $
/*
This script provides functions to print out
@@ -58,6 +58,7 @@
switch ($num) {
case 200: $status = "OK"; break;
case 301: $status = "Moved Permanently"; break;
+ case 302: $status = "Found"; break;
case 404: $status = "Not Found"; break;
default: return FALSE;
}