One problem with this. A module that returns a failure condition doesn't
affect request processing. I looked at doing this after you sent me
private mail about this, and I realized pretty quickly that if mod_perl
returned an error, then the server would continue to serve the request.
We need to do one of two things:
1) Back out this change so that modules can't fail on this phase
2) Make the core actually error out of the request processing if a module
fails during this phase.
Ryan
On 25 Mar 2001 [EMAIL PROTECTED] wrote:
> dougm 01/03/25 09:38:19
>
> Modified: include http_request.h
> server core.c request.c
> Log:
> change create_request hook to RUN_ALL/return int so handlers can throw errors
>
> Revision Changes Path
> 1.28 +1 -1 httpd-2.0/include/http_request.h
>
> Index: http_request.h
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/include/http_request.h,v
> retrieving revision 1.27
> retrieving revision 1.28
> diff -u -r1.27 -r1.28
> --- http_request.h 2001/03/18 02:33:20 1.27
> +++ http_request.h 2001/03/25 17:38:18 1.28
> @@ -253,7 +253,7 @@
> * @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
>
>
>
> 1.5 +2 -1 httpd-2.0/server/core.c
>
> Index: core.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/core.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- core.c 2001/03/22 10:03:28 1.4
> +++ core.c 2001/03/25 17:38:18 1.5
> @@ -3248,7 +3248,7 @@
> }
> }
>
> -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 @@
> 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)
>
>
>
> 1.3 +1 -1 httpd-2.0/server/request.c
>
> Index: request.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/request.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- request.c 2001/03/18 02:33:22 1.2
> +++ request.c 2001/03/25 17:38:18 1.3
> @@ -115,7 +115,7 @@
> 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)
>
> /*****************************************************************
> *
>
>
>
>
>
_______________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------