httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul J. Reder" <rede...@raleigh.ibm.com>
Subject [Patch]: PR 3454, PR 3019. .htaccess ignored in <Directory ~ "reg-ex"> directories.
Date Wed, 04 Aug 1999 19:02:12 GMT
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