diff --git a/mod_absec.c b/mod_absec.c index 6ca7fce..89bdbf4 100644 --- a/mod_absec.c +++ b/mod_absec.c @@ -86,10 +86,23 @@ static int check_autorization(request_rec *r) return 0; } +//////////////////////////////////////////////////////////////// +/* Main routine */ +static int absec_handler_last(request_rec *r) +{ + // Is this module really called? + if (strcmp(r->handler, "absec")) { + return DECLINED; + } + r->content_type = "text/html"; + //ap_rprintf(r, "The sample page from mod_absec.c %s \n
", r->args); + ap_rprintf(r, "After Url: %s from %s \n
", r->filename, r->uri); + return (OK); +} //////////////////////////////////////////////////////////////// /* Main routine */ -static int absec_handler(request_rec *r) +static int absec_handler_first(request_rec *r) { // Is this module really called? if (strcmp(r->handler, "absec")) { @@ -294,7 +307,8 @@ static int absec_handler(request_rec *r) static void absec_register_hooks(apr_pool_t *p) { //ap_hook_handler(absec_handler, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_handler(absec_handler, NULL, NULL, APR_HOOK_LAST); + ap_hook_handler(absec_handler_last, NULL, NULL, APR_HOOK_LAST); + ap_hook_handler(absec_handler_first, NULL, NULL, APR_HOOK_FIRST); } ////////////////////////////////////////////////////////////////