Bug #66856 [Com]: Failed manpage lookups return 200 OK
| From: | cmbecker69 at gmx dot de | Date: | Sat, 03 Jan 2015 13:14:17 +0000 |
| Subject: | Bug #66856 [Com]: Failed manpage lookups return 200 OK | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-20480@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66856&edit=1
ID: 66856
Comment by: cmbecker69 at gmx dot de
Reported by: eldmannen+php at gmail dot com
Summary: Failed manpage lookups return 200 OK
Status: Closed
Type: Bug
Package: Website problem
PHP Version: Irrelevant
Assigned To: levim
Block user comment: N
Private report: N
New Comment:
> so technically, the resource is found.
IMHO, the *requested* resource is not found, for instance, when
<http://php.net/doesntexist> is requested.
> If we return a 404, we are essentially telling the browser that
> the "search results functionality" isn't available.
Note, that it is something different when you type "doesntexist"
in the searchbox. You may also compare the difference in the
"final" URI:
<http://php.net/manual-lookup.php?pattern=doesntexist&scope=quickref>
<http://php.net/manual-lookup.php?pattern=doesntexist&lang=en&scope=404quickref>
The value of the scope parameter already hints at a "404".
Previous Comments:
------------------------------------------------------------------------
[2015-01-03 12:49:31] jacob@php.net
GitHub and Wikipedia's approach are slightly different to PHP.net in my opinion as they render
a straight 404 whereas PHP.net returns result sets based on a list possible matches - so
technically, the resource is found. If we return a 404, we are essentially telling the browser that
the "search results functionality" isn't available.
------------------------------------------------------------------------
[2015-01-03 12:41:41] cmbecker69 at gmx dot de
> A 404 is intended to be delivered should an application resource
> cannot be located by the server, not when a search returns no
> results.
Correct. However, in this case the user doesn't intend to search.
Compare the respective behavior of php.net to Github[1] or
Wikipedia[2], for instance.
[1] <https://github.com/doesntexist>
[2] <http://en.wikipedia.org/wiki/Doesntexist>
------------------------------------------------------------------------
[2015-01-03 12:14:48] jacob@php.net
A 404 is intended to be delivered should an application resource cannot be located by the server,
not when a search returns no results.
------------------------------------------------------------------------
[2014-03-13 17:08:53] levim@php.net
A successful search isn't a 404. The fact that it is doing a search means it didn't find
what you are looking for, though. Anyone else have any comments? Sending a 404 is really easy if
that's what we want to do, I'm just not sure.
------------------------------------------------------------------------
[2014-03-08 20:13:33] eldmannen+php at gmail dot com
Description:
------------
When you try look up something by typeing www.php.net/<something_here> then if the lookup
fails it says not found but it still serves a HTTP status code of 200 OK which makes the web browser
save the URL in its address bar history.
Instead return HTTP status code 404 when a lookup fails to find anything, this way request
doesn't get saved in the address bar history.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66856&edit=1