com web/php: Fixed bug#67062 (Requesting none xistent files should produce HTTP 404 Not F ound): error.php
| From: | Paul Dragoonis | 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-22089@lists.php.net to get a copy of this message | ||
Commit: 934b2bf82394d936c7fad0a5bfb1b2c4ac25609c
Author: Hannes Magnusson <bjori@mongodb.com> Sun, 13 Apr 2014 09:48:41 -0700
Parents: 75d0e8cf8fe25867b437caf4f718d523cb6a2e4e
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=934b2bf82394d936c7fad0a5bfb1b2c4ac25609c
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";
}