Commit: e047aae42e2265a6eb9b461a243757f0ddf470c6 Author: Hannes Magnusson <[email protected]> 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"; } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
