httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: cvs commit: httpd-2.0/server core.c request.c
Date Mon, 27 Aug 2001 02:43:39 GMT
From: "Greg Stein" <gstein@lyra.org>
Sent: Sunday, August 26, 2001 4:04 AM


> On Sat, Aug 25, 2001 at 11:43:19PM -0000, wrowe@apache.org wrote:
> > wrowe       01/08/25 16:43:19
> > 
> >   Modified:    .        CHANGES
> >                include  http_request.h
> >                modules/http http_core.c http_protocol.c http_request.c
> >                         mod_core.h
> >                server   core.c request.c
> >   Log:
> >     Introduce the map_to_storage hook, which allows modules to bypass
> >     the directory_walk and file_walk for non-file requests.  TRACE
> 
> How is this different from the translate_name hook? Your new hook and the
> translate_name are both about translating URLs into the backend storage.
> 
> Why was this new one added? (did I miss some discussion somewhere?) And if
> so, then why does translate_name stick around?

The original idea for the hook name was walkers (as in ap_run_walkers()).
map_to_storage actually validates that the translated name is serveable,
and sets up any storage specific per_dir_config values.  It was also going
to pick up the downgrade http protocol, but that doesn't make sense in this
hook.  I'll move that aspect to the bottom of the translate_name phase.

Perhaps this should be get_storage_dir_config or something like that.
Note it is run first, instead of run all (as the translate_name hook is),
so that _one_ module can assume ownership and pick back up the request
after the authz/authn phases.

This hook has enormous reprecussions on avoiding directory walks and file walks
that we have all complained so long about.  The patches today to mod_proxy
(adding a proxy_walk phase, and skipping the old cruft) illustrate this.  Now
that proxy and directory sections are listed seperately, we save a ton of tests
in both given a complex server configuration.  dir walks <Dir > sections, and
proxy walks <Proxy > sections, period.

The last remaining hurdle outside of dir/file walking is the duplicate <Location >
walk we perform.  I'm preparing a patch to do this walk once, and as long as the
r->uri is unchanged, we continue to merge the same 'preconstructed' location walk
every time we repeat that step.

I want to lock down the default handler as well, to error 500 if we didn't call
dir_walk/file_walk because a badly written module circumvented the core 
map_to_storage hook fn.  After that, I believe we will be as good as can be, with
some major cleanup needed to subreq/internal_internal_redirect handling.

Bill



Mime
View raw message