php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67062 Requesting nonexistent files should produce HTTP 404 Not Found
Submitted: 2014-04-13 06:28 UTC Modified: 2014-04-13 16:50 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: php-bugs-2014 at ryandesign dot com Assigned: bjori (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs-2014 at ryandesign dot com
New email:
PHP Version: OS:

 

 [2014-04-13 06:28 UTC] php-bugs-2014 at ryandesign dot com
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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-13 16:50 UTC] bjori@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bjori
 [2014-04-13 16:50 UTC] bjori@php.net
The fix for this bug has been committed. Since the websites are not directly
updated from the repository, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.

Thank you for the report, and for helping us make PHP.net better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 23:01:29 2024 UTC