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
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)
ap_construct_url(r->pool, ifile, r));
return HTTP_MOVED_PERMANENTLY;
}
+
return OK;
}