Bug #67062 [NEW]: Requesting nonexistent files should produce HTTP 404 Not Found
| From: | php-bugs-2014 at ryandesign dot com | Date: | Sun, 13 Apr 2014 06:28:40 +0000 |
| Subject: | Bug #67062 [NEW]: Requesting nonexistent files should produce HTTP 404 Not Found | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-18776@lists.php.net to get a copy of this message | ||
From: php-bugs-2014 at ryandesign dot com
Operating system:
PHP version: Irrelevant
Package: Website problem
Bug Type: Bug
Bug description:Requesting nonexistent files should produce HTTP 404 Not Found
Description:
------------
I am the maintainer of PHP in MacPorts. Last year in bug #64273 I
reported that requesting a nonexistent file from your download servers
erroneously resulted in a 200 OK status code instead of the expected 404
Not Found status code, making it impossible for MacPorts to tell when a
download had failed. We were using URLs like:
http://uk.php.net/distributions/php-5.3.222.tar.bz2
I was advised to switch to using URLs like:
http://uk.php.net/get/php-5.3.222.tar.bz2/from/this/mirror
And that is what I did. Afterward, the original style of URL was fixed
to return a 404 Not Found error when appropriate.
Now, I have discovered that the form of URL I was advised to switch to
has the same problem. It returns a 200 OK for nonexistent files. Can
this please be fixed again?
Which of these forms is the currently recommended form to use?
Test script:
---------------
curl -I -L http://uk.php.net/get/php-5.3.222.tar.bz2/from/this/mirror
Expected result:
----------------
HTTP/1.1 404 Not Found
etc.
Actual result:
--------------
HTTP/1.1 200 OK
Date: Sun, 13 Apr 2014 06:24:29 GMT
Server: Apache/2
X-Powered-By: PHP/5.4.21
Content-language: en
Set-Cookie: COUNTRY=USA%2C70.116.59.133; expires=Sun, 20-Apr-2014
06:24:29 GMT; path=/
Status: 200 OK
Cache-Control: private
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=utf-8
--
Edit bug report at https://bugs.php.net/bug.php?id=67062&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67062&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67062&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67062&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67062&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67062&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67062&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67062&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67062&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67062&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67062&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67062&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67062&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67062&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67062&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67062&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67062&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67062&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67062&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67062&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67062&r=mysqlcfg