httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: r->allowed ?
Date Thu, 29 Jan 1998 21:06:35 GMT
On Thu, 29 Jan 1998 rasmus@bellglobal.com wrote:

> Alexei mentioned the other day that many modules do not set r->allowed
> correctly.  mod_php would be one of those nasty modules that doesn't set it.
> 
> Could someone explain the theory behind this one?  Looking through the
> modules, it isn't clear to me why for example mod_cgi sets it while 
> mod_include does not.  

Because mod_include only handles GET requests. And all requests are
assumed to be GETtable. But mod_include should actually set it anyway. It
doesn't. A lot of modules don't. They should. Ah well.

See, if Apache gets an OPTIONS, or has to return a 405 or 501 response, it
has to (HTTP/1.1) construct an Allow: header. Unfortunately, the Apache
API doesn't have any good way to know what methods are allowed for a given
URI. So I hacked in the r->allowed thing.

For an example of how this is supposed to be used, see mod_actions.
mod_cgi is a bad example, because CGIs are passed *any* method except
OPTIONS.

At any rate, this is ugly, and always has been, and, as I said, needs a
better fix for 2.0.

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



Mime
View raw message