On Mon, Sep 30, 2002 at 07:04:49PM -0700, Greg Stein wrote:
> On Mon, Sep 30, 2002 at 05:35:40PM -0700, Ryan Morgan wrote:
> >...
> > This patch moves all the DAV method registration into the mod_dav module
> > from the http core.  I'd like to do this for a couple reasons:
> > 
> > 1) It makes more sense to register these methods from the same module
> >    they are used in.
> 
> mod_dav is (currently) an optional module. However, those methods are
> defined within RFC standards. They apply to everything.
>

Maybe I don't understand how DAV works, but how do the DAV methods apply
if the mod_dav module is not loaded?  The behavior of the server does not
change (when mod_dav is not loaded) for requests with those methods.
 
> > 2) Since Apache can only handle 62 registered methods, it doesn't make
> >    sense to register these in the core even if the dav module isn't loaded.
> >    (Other modules may need these slots in the method bitmask)
> 
> There are no other HTTP methods in the current RFC universe. No other method
> has a "better" claim to those slots than the DAV methods.
> 
> If you're going to have slots, then use them for standard methods. At the
> moment, those are the DAV methods. If/when we see an explosion of other
> methods, and the space getting crowded, *then* we can move them.
> 

Since Apache2 has the ability to serve multiple protocols, so the number of
registered methods can grow quite rapidly.  Since the HTTP module cannot 
be removed from the server (without some serious effort.. ask rbb), the next 
best thing is to not register those DAV methods if they will not be used by 
the server.

The ideal solution would be to do away with the allow_methods bitmask
altogether for something that does not have the 62 method limitation.
This is also quite difficult, since much of the server relies on this
being a bitmask.

> >...
> > This patch also fixes a bug where DAV's BIND and SEARCH methods were being
> > registered with the core twice, since post_config gets called twice.
> > I have put in a check so that the methods only get registered once.
> 
> Barely a bug. The core returns the same number for the second registration.
>

True, the function will not register the same method twice, but what about
the case where mod_dav is the first to register a method?  The pool that gets
passed in (pconf) will get cleared on the second run.  On the first call
this is the pool that will be used to create the method hash. (this is 
the hash used for subsequent calls to ap_method_register)
 
> > This passes the DAV litmus test (http://www.webdav.org/neon/litmus/), but
> > it could use some reviewing by people more familiar the module.
> > 
> > Comments?
> 
> I see little purpose for this. The DAV methods, which are defined by RFCs,
> are moving out for some nebulous concept of other "more righteous" methods.
> I just don't follow that reasoning :-)

I somehow felt you would see it this way :)  Personally, I don't see the
purpose in registering those methods with the core if they are not intended 
to be used within the server.  From my testing, the behavior of the server 
doesn't change, and it frees up resources that can be used by other modules.

-Ryan

Reply via email to