Commit 4c0be578 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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 <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88255 13f79535-47bb-0310-9956-ffa450edef68
parent 74cca4b2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
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]

+3 −4
Original line number Diff line number Diff line
@@ -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 = {