From 2edc2edcf6dc205adc09547d05946855a6164000 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Wed, 21 Feb 2001 01:04:39 +0000 Subject: [PATCH] Make mod_dir use a fixup for sending a redirect to the browser. Before this, we were using a handler, which doesn't make much sense, because the handler wasn't generating any data, it would either return a redirect error code, or DECLINED. This fits the current hooks better. Submitted by: Ryan Morgan git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88255 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 6 ++++++ modules/mappers/mod_dir.c | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f4c30ad837b..2c4fdcf0be2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,11 @@ Changes with Apache 2.0.12-dev + *) Make mod_dir use a fixup for sending a redirect to the browser. + Before this, we were using a handler, which doesn't make much + sense, because the handler wasn't generating any data, it would + either return a redirect error code, or DECLINED. This fits the + current hooks better. [Ryan Morgan ] + *) Make the threaded MPM use APR threads instead of pthreads. [Ryan Bloom] diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 212572e020f..1293bd654a8 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -124,8 +124,9 @@ static int handle_dir(request_rec *r) int num_names; int error_notfound = 0; - if(strcmp(r->handler,DIR_MAGIC_TYPE)) + if (r->finfo.filetype != APR_DIR) { return DECLINED; + } d = (dir_config_rec *) ap_get_module_config(r->per_dir_config, &dir_module); @@ -223,9 +224,7 @@ static int handle_dir(request_rec *r) static void register_hooks(apr_pool_t *p) { - static const char * const aszSucc[]={ "mod_autoindex.c", NULL }; - - ap_hook_handler(handle_dir,NULL,aszSucc,APR_HOOK_MIDDLE); + ap_hook_fixups(handle_dir,NULL,NULL,APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA dir_module = { -- 2.47.2