httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Travis <jtra...@covalent.net>
Subject Re: index.html not served w/mod_autoindex active
Date Sun, 07 Jan 2001 21:44:14 GMT
On Sun, Jan 07, 2001 at 09:39:29PM +0000, Ben Laurie wrote:
> Jon Travis wrote:
> > 
> > On Sun, Jan 07, 2001 at 09:11:12PM +0000, Ben Laurie wrote:
> > > Jon Travis wrote:
> > > >
> > > > On Sun, Jan 07, 2001 at 05:50:21PM +0000, Ben Laurie wrote:
> > > > > rbb@covalent.net wrote:
> > > > > >
> > > > > > > > Do not consider this a veto in any way shape or form,
this is an opinion,
> > > > > > > > that we shouldn't have to call every handler.  Please
implement whatever
> > > > > > > > solution you like best.
> > > > > > >
> > > > > > > Since no-one else has expressed an opinion, I shall. :-)
> > > > > >
> > > > > > Cool.  I look forward to seeing it.  :-)  I am sorry that I
held things up
> > > > > > this long.  I didn't realize that I was the bottleneck.  If
I had, I would
> > > > > > have gotten out of the way much sooner.  :-)
> > > > >
> > > > > Don't sweat it - I didn't have time to do it any sooner, anyway!
> > > >
> > > > I hope this is the correct thread to respond on this to, so here goes:
> > > >
> > > > I just saw the commits which were made to hookize the handlers.  I have
> > > > a few comments:
> > > >
> > > >     1 - AP_DECLARE_HOOK for the handler should probably not be in http_config.h
> > > >         It should probably be in http_request.h
> > >
> > > Probably correct.
> > >
> > > >     2 - A new hook prototype has been made.  One that takes the handlername,
and
> > > >         the request.  This sucks.  Since the handler information is gleaned
> > > >         from the request anyway, why not keep the old prototype for the
> > > >         handler, and make the registered hook use some function to grab
the
> > > >         handler from the request_rec?
> > >
> > > Because then it has to be done every time, which is inefficient. Why
> > > does it suck?
> > 
> > Because it makes me have to write more code.. ;-)  mod_snake handles all
> > the request_rec based handlers in a same generic way.  By changing the
> > prototype of this function you kinda break that.. :-(
> 
> Ah.
> 
> >  You are doing it
> > everytime in ap_invoke_handler anyway, so the only inneficiency is that
> > introduced is an extra function call.
> 
> What?

You said that "Because then it has to be done every time, which is inneficient"
referring to the work that is done in ap_invoke_handler.  

> 
> >  And if you wanted, you could add
> > another field to the request_rec, and just manipulate that within
> > your ap_invoke_handler routine, or whatever.   That would save the
> > overhead of the function call.
> 
> I could by that. Makes it less clear how you get from A to B, but I'm
> not that fussed. OTOH, request_rec _already_ has handler:
> 
>     /** The handler string that we use to call a handler function */
>     const char *handler;	/* What we *really* dispatch on           */
> 
> the comments are a complete lie, of course. I don't know whether we can
> fix them without breaking stuff.

I don't know that adding the overhead of an extra function call is that
major of a deal here.  Some may disagree.  It is certainly more clear then
adding more stuff to the request_rec, IMO.

-- Jon


Mime
View raw message