httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nik600 <nik...@gmail.com>
Subject Re: best way to return the content of a file
Date Sat, 18 Aug 2012 16:26:33 GMT
On Sat, Aug 18, 2012 at 3:27 PM, Nick Kew <niq@apache.org> wrote:
>
> That has nothing to do with it!
>
> Several people have tried to help you, but you need to learn a bit before
> you're capable of being helped.  If you aren't going to learn the basics of
> the request processing cycle (which can also be found in the docs at
> apache.org, where they were recently updated), stick to something
> simple like CGI or PHP.
>
> --
> Nick Kew

Thanks for your patience, i've read the page at

http://httpd.apache.org/docs/2.2/developer/
and
http://httpd.apache.org/docs/trunk/developer/modguide.html

now is more clear to me the meaning of hooks and priority and i've
been able to change the uri value and see correct effects.

BUT, now i've got one more question :-)

why if i call the handler from a translate_name hook the

ap_hook_translate_name(kcache_handler, NULL, succ, APR_HOOK_MIDDLE);

the r->handler value is NULL?

is because the handler is evaluated only when there is an ap_hook_handler?

i'm enabling my module with a Location directive:

    <Location /data>
    SetHandler kcache
    </Location>

and i want to control the execution of the module with an initial check:

if (!r->handler || strcmp(r->handler, "kcache")) return (DECLINED);

but r->handler is null if the hook is called in ap_hook_translate_name
state, so how can i check this condition?

Thanks

-- 
/*************/
nik600
http://www.kumbe.it

Mime
View raw message