Re: map_to_storage hook question..

2003-10-02 Thread Henri Gomez
Bill Stoddard a écrit :

Bill Stoddard wrote:

Esteban Pizzini wrote:

Hi,

Anybody can explain me what map_to_storage hook does?? or where can I 
find
and example of its use??
 
Thank You!,
 Esteban
 

One use of map_to_storage is to bypass directory walk and file walk if 
your handler module -knows for certain- that the request is not being 
served out of the Apache file space. Your module would register a 
translate_name hook, a map_to_storage hook and a handler. It inspects 
the URL in translate_name then decides whether it will serve the 
content or not. If it decides it will serve its own content (but not 
out of the Apache file system) your module drops a hint in 
r-request_config (from translate_name) that map_to_storage will look 
for. If map_to_storage sees the hint, it returns OK which causes the 
core_map_to_storage hook to be bypassed. At this point, your handler 
dang well better not DECLINE the request if it decided in 
translate_name that it was going to serve the request.

Bill


To answer your 2nd question, I believe mod_proxy uses a map_to_storage 
hook, but I am not sure if it uses it exactly like I described above.
mod_jk and mod_webapp use it also :)




map_to_storage hook question..

2003-10-01 Thread Esteban Pizzini
Hi,

Anybody can explain me what map_to_storage hook does?? or where can I find
and example of its use??
 
Thank You!,
 Esteban
 



Re: map_to_storage hook question..

2003-10-01 Thread Bill Stoddard
Esteban Pizzini wrote:
Hi,

Anybody can explain me what map_to_storage hook does?? or where can I find
and example of its use??
 
Thank You!,
 Esteban
 

One use of map_to_storage is to bypass directory walk and file walk if 
your handler module -knows for certain- that the request is not being 
served out of the Apache file space. Your module would register a 
translate_name hook, a map_to_storage hook and a handler. It inspects 
the URL in translate_name then decides whether it will serve the content 
or not. If it decides it will serve its own content (but not out of the 
Apache file system) your module drops a hint in r-request_config (from 
translate_name) that map_to_storage will look for. If map_to_storage 
sees the hint, it returns OK which causes the core_map_to_storage hook 
to be bypassed. At this point, your handler dang well better not DECLINE 
the request if it decided in translate_name that it was going to serve 
the request.

Bill





Re: map_to_storage hook question..

2003-10-01 Thread Bill Stoddard
Bill Stoddard wrote:

Esteban Pizzini wrote:

Hi,

Anybody can explain me what map_to_storage hook does?? or where can I 
find
and example of its use??
 
Thank You!,
 Esteban
 

One use of map_to_storage is to bypass directory walk and file walk if 
your handler module -knows for certain- that the request is not being 
served out of the Apache file space. Your module would register a 
translate_name hook, a map_to_storage hook and a handler. It inspects 
the URL in translate_name then decides whether it will serve the content 
or not. If it decides it will serve its own content (but not out of the 
Apache file system) your module drops a hint in r-request_config (from 
translate_name) that map_to_storage will look for. If map_to_storage 
sees the hint, it returns OK which causes the core_map_to_storage hook 
to be bypassed. At this point, your handler dang well better not DECLINE 
the request if it decided in translate_name that it was going to serve 
the request.

Bill
To answer your 2nd question, I believe mod_proxy uses a map_to_storage 
hook, but I am not sure if it uses it exactly like I described above.

Bill