You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Martin Algesten <ma...@taglab.com> on 2002/10/30 18:50:40 UTC

error code 200 when doing

It can't be correct to reset the error code to 200 when say a 404 have 
happened.

A) Web caches, search engines etc will get confused by this. If a page 
get spidered by say Google and the returned response code is a 404, then 
the page will not be part of the index, which is correct, the opposite 
is silly. A broken page should of course be indicated as broken and a 
missing page should be indicated as missing, e.g. a 500 is a 500 and a 
404 is a 404 and not 200.

B) Generally around the web there seems to be a prescedence for not 
returning 200 when pages that don't exist are asked for:
$ curl -s -I http://www.microsoft.com/foo | grep HTTP
HTTP/1.1 404
$ curl -s -I http://java.sun.com/foo | grep HTTP
HTTP/1.1 404 Not Found
$ curl -s -I http://www.oracle.com/foo | grep HTTP
HTTP/1.1 404 Not Found
$ curl -s -I http://jakarta.apache.org/foo | grep HTTP
HTTP/1.1 404 Not Found

What is the argument for returning 200?

Regards,
Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>