httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 30 Jul 2001 18:51:58 GMT
wrowe       01/07/30 11:51:58

  Modified:    include  http_core.h
               server   core.c
  Log:
    Provide the same optimization to the dir_config structure to track
    d_is_absolute, along with d_is_fnmatch.
  
  Revision  Changes    Path
  1.46      +7 -1      httpd-2.0/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_core.h,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- http_core.h	2001/07/27 21:01:16	1.45
  +++ http_core.h	2001/07/30 18:51:57	1.46
  @@ -364,7 +364,7 @@
   } server_signature_e;
   
   typedef struct {
  -    /* path of the directory/regex/etc.  see also d_is_fnmatch below */
  +    /* path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
       char *d;
       /* the number of slashes in d */
       unsigned d_components;
  @@ -425,6 +425,12 @@
        * is set to the result of that call.
        */
       unsigned d_is_fnmatch : 1;
  +
  +    /* since is_absolute(conf->d) was being called so frequently in
  +     * directory_walk() and its relatives, this field was created and
  +     * is set to the result of that call.
  +     */
  +    unsigned d_is_absolute : 1;
   
       /* should we force a charset on any outgoing parameterless content-type?
        * if so, which charset?
  
  
  
  1.31      +4 -0      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- core.c	2001/07/28 00:46:27	1.30
  +++ core.c	2001/07/30 18:51:57	1.31
  @@ -132,6 +132,7 @@
           conf->d = apr_pstrcat(a, dir, "/", NULL);
       }
       conf->d_is_fnmatch = conf->d ? (apr_is_fnmatch(conf->d) != 0) : 0;
  +    conf->d_is_absolute = conf->d ? (ap_os_is_path_absolute(conf->d) != 0) : 0;
       conf->d_components = conf->d ? ap_count_dirs(conf->d) : 0;
   
       conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL;
  @@ -192,6 +193,7 @@
       
       conf->d = new->d;
       conf->d_is_fnmatch = new->d_is_fnmatch;
  +    conf->d_is_absolute = new->d_is_absolute;
       conf->d_components = new->d_components;
       conf->r = new->r;
       
  @@ -1663,6 +1665,7 @@
   
       conf->d = apr_pstrdup(cmd->pool, cmd->path);	/* No mangling, please */
       conf->d_is_fnmatch = apr_is_fnmatch(conf->d) != 0;
  +    conf->d_is_absolute = ap_os_is_path_absolute(conf->d) != 0;
       conf->r = r;
   
       ap_add_per_url_conf(cmd->server, new_url_conf);
  @@ -1729,6 +1732,7 @@
   
       conf->d = cmd->path;
       conf->d_is_fnmatch = apr_is_fnmatch(conf->d) != 0;
  +    conf->d_is_absolute = ap_os_is_path_absolute(conf->d) != 0;
       conf->r = r;
   
       ap_add_file_conf(c, new_file_conf);
  
  
  

Mime
View raw message