httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: [PATCH] Take 3 of mod_include patch...
Date Thu, 06 Sep 2001 18:54:49 GMT

> On Thursday 06 September 2001 09:36, Ian Holsman wrote:
> > On Thu, 2001-09-06 at 08:12, Ryan Bloom wrote:
> > > > > I have some big problems with the way that location walk and
> > > > > directory walk work now, BTW, because if I write a module that
> > > > > doesn't get pages from the filesystem, I have to catch those in the
> > > > > map_to_storage hook, or the server will 500.
> > > >
> > > > Hmm... I'd have thought that was the whole point of the map_to_storage
> > > > hook, if its name were any indication...  <shrug>
> > >
> > > It is, but if I am just putting together a quick module, to solve a
> > > problem and it generates the page itself, all I should have to do, is
> > > create a handler, like I did in 1.3.  If I also have to create a
> > > map_to_storage hook, then we will have broken a lot of 1.3 modules when
> > > they try to port, and I can't see a good reason for that.
> > >
> > > The map_to_storage hook should be an optimization that I want to use, not
> > > a requirement that I HAVE to use.
> >
> > you don't need to use it.
> > look at mod-status/mod-info
> > both requests aren't handled by the serving a file from the file-system.
> > they >could< write a map-to-storage hook which would return 'OK' if the
> > handler is status/info.
> > but at the moment they don't and they let it go through to the default
> > map_to_storage hook implementations, directory_walk and file_walk.
> >
> > I'm not seeing why a module developer would need to care about
> > map_to_storage unless they want serve the file from say proxy,
> > or a oracle DB for instance.
>
> Neither of those modules is trying to translate the name though. Mod_jk, and I'm
> assuming mod_webapp, both do name translation, but not map_to_storage.
> I should be able to completely forget map_to_storage exists if I want to.
>

What kind of name translation is mod_jk attempting to do?  If I recall correctly, mod_jk
sets r->filename to NULL -during the name translation phase- if it determines it will
handle the request.  Setting r->filename = NULL during translation is a trick
specificially designed to prevent directory_walk from running on a URL that mod_jk -knows-
is not in the file system. The correct way to implement this performance optimization in
mod_jk for httpd 2.0 is to -replace- the translation phase hook with a map_to_storage
hook.  mod_jk makes the determination about whether it is going to handle the request in
map_to_storage. If mod_jk can handle the request (content is a servlet), then it returns
OK on the map_to_storage call which prevents all the other map_to_storage hooks from
running.

Bill

Bill


Mime
View raw message