You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by sh...@us.ibm.com on 1999/01/08 20:40:05 UTC

Content Handler called on 404's


In the CVS extract from Jan 8, 9AM it seems
that the content handler in a module I am writing is
being called on 404's.

Am I correct that the content handler should not
be called if the file requested doesn't exist?

ie.  The request should end before reaching the
content handler stage???

Any ideas on why?

Shane Owenby                     shaneo@us.ibm.com
Software Engineer               IBM Apache Webserver Developer



Re: Content Handler called on 404's

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Fri, 8 Jan 1999 shaneo@us.ibm.com wrote:

> In the CVS extract from Jan 8, 9AM it seems
> that the content handler in a module I am writing is
> being called on 404's.
> 
> Am I correct that the content handler should not
> be called if the file requested doesn't exist?

No. AFAIK, it is the handler's job to determine whether or not the file
exists, and to return HTTP_NOT_FOUND otherwise. Take a look at
default_handler, for example.

It has to work this way if methods such as PUT are to be supported. Also
consider that as far as the server knows, the file *always* exists - any
request /foo/bar/bingo could be considered a request for / with path info
of /foo/bar/bingo.

-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *