From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 11:05 AM


> Ok, so the Apache 1.3 walks/hooks flow looks like this:

I'll rework this for you just a bit...
 
> ----
> ::post read-request hook::
> 
> location_walk
>   - checks r->uri and sets server-wide config
> 
> XXuri->filename translation hookXX -- let's refer to this as
  ::uri translate name hook::

Modules translate the URI to r->filename, and/or determine they
will interfere^H^H^H^H^H^H^H^H^Hserve this request without the
filesystem at all :)

  ::map_to_storage hook::

Modules merge whatever per_dir_configs apply to their request (mod_proxy
does a proxy_walk), or return OK if there are no applicable, resource
specific per_dir_configs (say, for server-status), or let the reqeust fall
through to the...

    --core map_to_storage function (hooked last)--
>     directory_walk
>     - checks fullpath r->filename and sets per-dir config
>     file_walk
>     - checks file part of r->filename
> 
> location_walk
>   - second call (in case anyone changed r->uri or r->per_dir_config)
> 
> ::header parser hook::
> 
> ::check access hook::
>   ::check user id hook::
>   ::check auth hook::
> 
> ::type check hook::
> 
> ::fixup hook::
> 
> ::content handler hook::
> 
> ::logger hook::
> ----
> 
> Could someone more intimate with the 2.0 code post a similar flow for 2.0?
> I am just trying to make sure that this code I am writing for 1.3 right
> now won't have to be completely redesigned for 2.0.

It shouldn't.  You potentially need to protect yourself from NULL r->filename
(we haven't decided what to do yet with *this*is*not*a*file* requests.)  Since
PHP generally serves -files-, this won't be a huge change for you.  For serving
from an SQL database, or proxied requests, or internal handlers (even php-status)
you can speed things up/protect the right resources with the map_to_storage hook.

mod_proxy now keeps it's own <Proxy[Match] {uri}> sections instead of using the
<Directory proxy:{uri}> fooness.  Apache 2.0 won't run bogus paths through the
<Directory > sections anymore, see the (rather straightforward) patch to mod_proxy
on how to implement containers against a different resource for non-filesystem
requests, using map to storage.  Instead of the core map_to_storage function,
proxy hooks the map_to_storage phase and uses proxy_walk instead.

I'll try to document this complete on my way into the office tommorow ;)

Bill


Reply via email to