]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make mod_dir use a fixup for sending a redirect to the browser.
authorRyan Bloom <rbb@apache.org>
Wed, 21 Feb 2001 01:04:39 +0000 (01:04 +0000)
committerRyan Bloom <rbb@apache.org>
Wed, 21 Feb 2001 01:04:39 +0000 (01:04 +0000)
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 <rmorgan@covalent.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88255 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_dir.c

diff --git a/CHANGES b/CHANGES
index f4c30ad837b3aedea52e89107b2f6fff7c65e9f3..2c4fdcf0be2b7436c59bb302b76462d3acb57c7c 100644 (file)
--- 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 <rmorgan@covalent.net>]
+
   *) Make the threaded MPM use APR threads instead of pthreads.
      [Ryan Bloom]
 
index 212572e020f73175f2335f599866169e17a5ae19..1293bd654a8c5006d53ef3f2581bb66a4501d525 100644 (file)
@@ -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 = {