Commit 2693b837 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

a couple of hacks to mod_example to get it to behave a little better:

1) return DECLINED instead of OK from the quick_handler so we get
   some output

2) don't install x_fixer_upper() as a create_request handler; otherwise
   we segfault since r->per_dir_config hasn't been initialized yet


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89955 13f79535-47bb-0310-9956-ffa450edef68
parent 40b8df14
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -988,6 +988,9 @@ static void x_insert_filter(request_rec *r)
}

/*
 * XXX fix my comment!!!!!!  this sounds like the comment for a fixup
 *     handler
 *
 * This routine is called to perform any module-specific fixing of header
 * fields, et cetera.  It is invoked just before any content-handler.
 *
@@ -1004,7 +1007,7 @@ static int x_quick_handler(request_rec *r)
     * Log the call and exit.
     */
    trace_add(r->server, NULL, cfg, "x_post_config()");
    return OK;
    return DECLINED;
}

/*
@@ -1248,7 +1251,6 @@ static void x_register_hooks(apr_pool_t *p)
    ap_hook_log_transaction(x_logger, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_http_method(x_http_method, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_default_port(x_default_port, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_create_request(x_fixer_upper, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_translate_name(x_translate_handler, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id(x_check_user_id, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_fixups(x_fixer_upper, NULL, NULL, APR_HOOK_MIDDLE);