com web/php: Fixed bug#67062 (Requesting none xistent files should produce HTTP 404 Not F ound): error.php
| From: | Hannes Magnusson | Date: | Sun, 13 Apr 2014 16:49:42 +0000 |
| Subject: | com web/php: Fixed bug#67062 (Requesting none xistent files should produce HTTP 404 Not F ound): error.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-18778@lists.php.net to get a copy of this message | ||
Commit: e047aae42e2265a6eb9b461a243757f0ddf470c6
Author: Hannes Magnusson <bjori@mongodb.com> Sun, 13 Apr 2014 09:48:41 -0700
Parents: 3a4007767aa43ee965ad4761d3410856f7c244bb
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e047aae42e2265a6eb9b461a243757f0ddf470c6
Log:
Fixed bug#67062 (Requesting nonexistent files should produce HTTP 404 Not Found)
Bugs:
https://bugs.php.net/67062
Changed paths:
M error.php
Diff:
diff --git a/error.php b/error.php
index 23165b9..14423a7 100644
--- a/error.php
+++ b/error.php
@@ -170,13 +170,15 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI,
$dlinfo)) {
error_nomirror($mr);
exit;
}
+
// Start the download process
- status_header(200);
include $_SERVER['DOCUMENT_ROOT'] . "/include/do-download.inc";
$filename = get_actual_download_file($df);
if ($filename) {
+ status_header(200);
download_file($mr, $filename);
} else {
+ status_header(404);
/* The file didn't exist on this server.. ask the user to pick another mirror */
include $_SERVER['DOCUMENT_ROOT'] . "/include/get-download.inc";
}