httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Tim.Coste...@bankerstrust.com.au>
Subject RE: cvs commit: apache-2.0/mpm/conf httpd.conf-dist-win
Date Fri, 20 Aug 1999 02:29:10 GMT
Rodent of Unusual Size wrote:
>
> Bill Stoddard wrote:
> > 
> > Rodent of Unusual Size wrote:
> > 
> > > Actually, I would like "<Directory />" on Windows to mean
> > > all drives and UNC paths, the way it does (roughly speaking)
> > > on Unix.
> > 
> > I have to give it more thought, but offhand, I don't think this is
> > really a feasible or desireable thing to do. Windows file systems
> > do not really support the notion of a 'root' directory.
> 
> I don't see that as really being relevant.  There should be
> some way to say "these directives apply to *all* files on the
> server unless overridden."  With network drives appearing and
> disappearing as remote file systems are connected at need,
> I think it is unreasonable to expect that the NT sysadmin (!)
> should have to track that with appropriate changes to
> httpd.conf.

The patch included in this mail should do the trick. It processes the
first directory config before UNC and standard paths, and if it 
applies to "/" then it's merged, otherwise it's ignored until later 
in directory_walk. 

I guess whether or not this is a desirable thing to do, or the best
way to do it, remains up to the list to decide.

Tim

===== PATCH FOLLOWS =====

diff -r -N -C3 src-19990819/main/http_request.c src/main/http_request.c
*** src-19990819/main/http_request.c	Fri May 21 13:12:36 1999
--- src/main/http_request.c	Fri Aug 20 01:37:51 1999
***************
*** 433,438 ****
--- 433,465 ----
  
      iStart = 1;
  #ifdef WIN32
+     /*
+      * On Win32 we want to use <Directory /> as a server-wide base.
+      * The block below is not related to an if, for or while statement.
+      *
+      * XXX: do we want file / dir globbing to happen here? do we need 
+      * to check for multiple entries that may match "/"?
+      */
+     {
+         core_dir_config *entry_core = (core_dir_config *)
+             ap_get_module_config(sec[0], &core_module);
+         void *this_conf = NULL;
+ 
+         if (entry_core->d_is_fnmatch) {
+             if (!ap_fnmatch(entry_core->d, "/", FNM_PATHNAME)) {
+                 this_conf = sec[0];
+             }
+         }
+         else if (!strcmp("/", entry_core->d))
+             this_conf = sec[0];
+ 
+         if (this_conf) {
+             per_dir_defaults = ap_merge_per_dir_configs(r->pool,
+                                                         per_dir_defaults,
+                                                         this_conf);
+         }
+     }
+     
      /* If the name is a UNC name, then do not walk through the
       * machine and share name (e.g. \\machine\share\)
       */


Mime
View raw message