You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Robinson <dr...@ast.cam.ac.uk> on 1995/08/24 19:48:00 UTC
apache 0.8.11 ignoring .htaccess files
ug: apche 0.8.11 gave preference to <directory> directives over .htaccess
files, instead of vice versa.
The patch fixes this oft-reported bug.
---------------- begin patch
*** http_request.c.orig Wed Aug 23 02:16:13 1995
--- http_request.c Thu Aug 24 17:40:16 1995
***************
*** 263,287 ****
this_conf = entry_config;
}
- /* To determine whether .htaccess files are enabled, we need
- * to merge the parent config and any matching per-directory entry
- * in the config file.
- */
-
- overrides_here = core_dir->override;
if (this_conf)
! { /* just merge the override part */
! core_dir = (core_dir_config *)
! get_module_config(this_conf, &core_module);
! if (core_dir->override != OR_UNSET)
! overrides_here = core_dir->override;
}
!
! /* If .htaccess files are enabled, check for one. Note that if the
! * same thing is set in a .htaccess file and access.conf, the latter
! * takes precedence --- if something is in the config files, for a
! * specific directory (!), it's presumably there for a reason...
*/
if (overrides_here) {
--- 263,278 ----
this_conf = entry_config;
}
if (this_conf)
! {
! per_dir_defaults =
! merge_per_dir_configs (r->pool, per_dir_defaults, this_conf);
! core_dir =(core_dir_config *)get_module_config(per_dir_defaults,
! &core_module);
}
! overrides_here = core_dir->override;
! /* If .htaccess files are enabled, check for one.
*/
if (overrides_here) {
***************
*** 295,303 ****
merge_per_dir_configs (r->pool, per_dir_defaults,
htaccess_conf);
- if (this_conf)
- per_dir_defaults =
- merge_per_dir_configs (r->pool, per_dir_defaults, this_conf);
}
r->per_dir_config = per_dir_defaults;
--- 286,291 ----
---------------- end patch