Bug #64273 [Opn->Asn]: Requesting nonexistent files should produce HTTP 404 Not Found
| From: | tyrael@php.net | Date: | Fri, 22 Feb 2013 12:50:55 +0000 |
| Subject: | Bug #64273 [Opn->Asn]: Requesting nonexistent files should produce HTTP 404 Not Found | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-15536@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64273&edit=1
ID: 64273
Updated by: tyrael@php.net
Reported by: php-bugs-2013 at ryandesign dot com
Summary: Requesting nonexistent files should produce HTTP 404
Not Found
-Status: Open
+Status: Assigned
Type: Bug
Package: Website problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: tyrael
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2013-02-22 10:59:32] tyrael@php.net
that sounds like a good compromise
(funnyfact: I've checked and trying to download a nonexistent release on apple
like iTunes will result in an empty 404 page, so they not showing that nice 404
page for the direct downloads)
------------------------------------------------------------------------
[2013-02-22 10:44:32] php-bugs-2013 at ryandesign dot com
I have no objection to you making it easier for users to find your software on
your web site. But please do so in a way that does not increase the support burden
for people trying to help your users install your software, namely me and other
people who maintain PHP in package management systems.
One solution would be to serve up a custom 404 page that says "The file you
requested was not found; go *here* for a list of available files," or some other
wording for directing the user to the Releases page. Or even put links to the
latest releases on the 404 page. See how Apple does their 404 page:
http://apple.com/404notfound
------------------------------------------------------------------------
[2013-02-22 10:27:49] tyrael@php.net
Hi,
it seems that it is/was an intentional decision so that the it is more convinient
for the humans to find what they are looking for when they request a distribution
which isn't there:
http://git.php.net/?p=web/php.git;a=blob;f=error.php#l120
fixing the problem reported here would be trivial, but it requires a decision
which I don't wanna take on alone.
------------------------------------------------------------------------
[2013-02-22 09:04:39] php-bugs-2013 at ryandesign dot com
Description:
------------
Requesting a nonexistent file from the network of PHP mirror servers should
product an HTTP 404 Not Found error. In fact it produces an HTTP 302 Found
redirect to a URL that produces an HTTP 200 OK code. This makes automated download
systems think that the download was successful when it really was not. For example
here is the type of problem this causes for the MacPorts project:
https://trac.macports.org/ticket/38162
Test script:
---------------
curl -I -L http://uk.php.net/distributions/php-5.3.222.tar.bz2
Expected result:
----------------
HTTP/1.1 404 Not Found
Date: Fri, 22 Feb 2013 08:53:01 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-language: en
Set-Cookie: LAST_LANG=en; expires=Sat, 22-Feb-2014 08:53:01 GMT; path=/;
domain=.php.net
Set-Cookie: COUNTRY=USA%2C72.183.101.32; expires=Fri, 01-Mar-2013 08:53:01 GMT;
path=/; domain=.php.net
Status: 404 Not Found
Content-Length: 4173
Connection: close
Content-Type: text/html;charset=utf-8
Actual result:
--------------
HTTP/1.1 302 Found
Date: Fri, 22 Feb 2013 08:38:45 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-language: en
Set-Cookie: COUNTRY=USA%2C72.183.101.32; expires=Fri, 01-Mar-2013 08:38:45 GMT;
path=/; domain=.php.net
Location: http://uk1.php.net/releases/
Connection: close
Content-Type: text/html; charset=utf-8
HTTP/1.1 200 OK
Date: Fri, 22 Feb 2013 08:38:45 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-language: en
Set-Cookie: COUNTRY=USA%2C72.183.101.32; expires=Fri, 01-Mar-2013 08:38:45 GMT;
path=/; domain=.php.net
Connection: close
Content-Type: text/html;charset=utf-8
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64273&edit=1