diff options
author | Greg Stein <gstein@apache.org> | 2001-02-24 23:40:49 +0100 |
---|---|---|
committer | Greg Stein <gstein@apache.org> | 2001-02-24 23:40:49 +0100 |
commit | 8970167b7c15b8e509f2e402642d5d039fd897ed (patch) | |
tree | 8cdf0cc8af87fa056ddccac2946d8e0667838159 /modules | |
parent | include apr_lib.h for apr_isspace() definition (diff) | |
download | apache2-8970167b7c15b8e509f2e402642d5d039fd897ed.tar.xz apache2-8970167b7c15b8e509f2e402642d5d039fd897ed.zip |
do the redirection for GET requests only
Submitted by: Ryan Bloom and Greg Stein
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88305 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mappers/mod_dir.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 4c4be62239..4368f09767 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -118,15 +118,11 @@ static void *merge_dir_configs(apr_pool_t *p, void *basev, void *addv) static int fixup_dir(request_rec *r) { - dir_config_rec *d; - - if (r->finfo.filetype != APR_DIR) { + /* only (potentially) redirect for GET requests against directories */ + if (r->method_number != M_GET || r->finfo.filetype != APR_DIR) { return DECLINED; } - d = (dir_config_rec *) ap_get_module_config(r->per_dir_config, - &dir_module); - if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/') { char *ifile; if (r->args != NULL) @@ -140,6 +136,7 @@ static int fixup_dir(request_rec *r) ap_construct_url(r->pool, ifile, r)); return HTTP_MOVED_PERMANENTLY; } + return OK; } |