httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [Patch]: PR 3454, PR 3019. .htaccess ignored in <Directory ~ "reg-ex"> directories.
Date Thu, 05 Aug 1999 17:30:46 GMT
This can cause the same .htaccess to be applied twice for one directory. 
Besides, it's documented that .htaccess are only applied while walking the
tree for the non-regex directory sections.  And for both the PRs you
mention they don't even need the regex, they can just use wildcard which
works as expected (and is more efficient). 

I would say the problem is that regex directory containers were ill
thought out to begin with (given that this is like the umpteenth problem
with them ;)

Dean

On Wed, 4 Aug 1999, Paul J. Reder wrote:

> The following patch fixes a problem in http_request.c that ignored
> .htaccess files in Directory containers defined in the httpd.conf file
> with a regular expression.
> 
> -- 
> Paul J. Reder
> -------------------------------------------------------------------------
> 
> Index: http_request.c
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
> retrieving revision 1.149
> diff -u -r1.149 http_request.c
> --- http_request.c      1999/05/21 12:16:21     1.149
> +++ http_request.c      1999/08/04 18:22:22
> @@ -531,6 +531,7 @@
>      for (; j < num_sec; ++j) {
>          void *entry_config = sec[j];
>          core_dir_config *entry_core;
> +        int overrides_here;
>  
>          entry_core = (core_dir_config *)
>                       ap_get_module_config(entry_config, &core_module);
> @@ -540,6 +541,26 @@
>                  per_dir_defaults =
>                      ap_merge_per_dir_configs(r->pool, per_dir_defaults,
>                                            entry_config);
> +            }
> +        }
> +
> +        /* If .htaccess files are enabled, check for one. */
> +        overrides_here = entry_core->override;
> +
> +        if (overrides_here) {
> +            void *htaccess_conf = NULL;
> +
> +            res = ap_parse_htaccess(&htaccess_conf, r, overrides_here,
> +                                   ap_pstrdup(r->pool, test_dirname),
> +                                   sconf->access_name);
> +            if (res != OK) {
> +                return res;
> +           }
> +            if (htaccess_conf) {
> +                per_dir_defaults = ap_merge_per_dir_configs(r->pool,
> +                                                            per_dir_defaults,
> +                                                            htaccess_conf);
> +                r->per_dir_config = per_dir_defaults;
>              }
>          }
>      }
> 


Mime
View raw message