From: Doug MacEachern Date: Sun, 25 Mar 2001 17:38:18 +0000 (+0000) Subject: change create_request hook to RUN_ALL/return int so handlers can throw errors X-Git-Tag: 2.0.16~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44238d2266167f8e9279ad8455c147eed525c34a;p=apache change create_request hook to RUN_ALL/return int so handlers can throw errors git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88576 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_request.h b/include/http_request.h index 822a147a43..662d11beb4 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -253,7 +253,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r); * @param r The current request * @ingroup hooks */ -AP_DECLARE_HOOK(void,create_request,(request_rec *r)) +AP_DECLARE_HOOK(int,create_request,(request_rec *r)) /** * This hook allow modules an opportunity to translate the URI into an diff --git a/server/core.c b/server/core.c index c1251a31bb..66462dde07 100644 --- a/server/core.c +++ b/server/core.c @@ -3248,7 +3248,7 @@ static void core_insert_filter(request_rec *r) } } -static void core_create_req(request_rec *r) +static int core_create_req(request_rec *r) { if (r->main) { ap_set_module_config(r->request_config, &core_module, @@ -3261,6 +3261,7 @@ static void core_create_req(request_rec *r) req_cfg->bb = apr_brigade_create(r->pool); ap_set_module_config(r->request_config, &core_module, req_cfg); } + return OK; } static void register_hooks(apr_pool_t *p) diff --git a/server/request.c b/server/request.c index f595ddab62..b015def039 100644 --- a/server/request.c +++ b/server/request.c @@ -115,7 +115,7 @@ AP_IMPLEMENT_HOOK_RUN_ALL(int,access_checker, AP_IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker, (request_rec *r),(r),DECLINED) AP_IMPLEMENT_HOOK_VOID(insert_filter, (request_rec *r), (r)) -AP_IMPLEMENT_HOOK_VOID(create_request, (request_rec *r), (r)) +AP_IMPLEMENT_HOOK_RUN_ALL(int,create_request,(request_rec *r),(r),OK,DECLINED) /***************************************************************** *