httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org (Ralf S. Engelschall)
Subject cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
Date Thu, 26 Feb 1998 11:04:05 GMT
rse         98/02/26 03:04:05

  Modified:    src      CHANGES
               src/modules/standard mod_rewrite.c
  Log:
  The RewriteLoglevel was different and incorrect against the docs and
  the per-server config merging was also inconsistent and bogus.
  
  Revision  Changes    Path
  1.669     +6 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.668
  retrieving revision 1.669
  diff -u -r1.668 -r1.669
  --- CHANGES	1998/02/26 10:18:31	1.668
  +++ CHANGES	1998/02/26 11:04:01	1.669
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b6
   
  +  *) Fix initialization of RewriteLogLevel (default now is 0 as documented 
  +     and not 1) and the per-virtual-server merging of directives. Now all
  +     directives except `RewriteEngine' and `RewriteOption' are either
  +     completely overridden (default) or completely inherited (when
  +     `RewriteOptions inherit') is used. [Ralf S. Engelschall, PR#1325]
  +
     *) Fix `RewriteMap' program lookup in situations where such maps are
        defined but disabled (`RewriteEngine off') in per-server context. 
        [Ralf S. Engelschall, PR#1431]
  
  
  
  1.74      +35 -21    apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mod_rewrite.c	1998/02/26 10:18:34	1.73
  +++ mod_rewrite.c	1998/02/26 11:04:03	1.74
  @@ -249,7 +249,7 @@
       a->options         = OPTION_NONE;
       a->rewritelogfile  = NULL;
       a->rewritelogfp    = -1;
  -    a->rewriteloglevel = 1;
  +    a->rewriteloglevel = 0;
       a->rewritelockfile = NULL;
       a->rewritelockfp   = -1;
       a->rewritemaps     = make_array(p, 2, sizeof(rewritemap_entry));
  @@ -267,30 +267,44 @@
       base      = (rewrite_server_conf *)basev;
       overrides = (rewrite_server_conf *)overridesv;
   
  -    a->state           = overrides->state;
  -    a->options         = overrides->options;
  -    a->rewritelogfile  = base->rewritelogfile != NULL ?
  -                         base->rewritelogfile : overrides->rewritelogfile;
  -    a->rewritelogfp    = base->rewritelogfp != -1 ?
  -                         base->rewritelogfp : overrides->rewritelogfp;
  -    a->rewriteloglevel = overrides->rewriteloglevel;
  -    a->rewritelockfile = base->rewritelockfile != NULL ?
  -                         base->rewritelockfile : overrides->rewritelockfile;
  -    a->rewritelockfp   = base->rewritelockfp != -1 ?
  -                         base->rewritelockfp : overrides->rewritelockfp;
  +    a->state   = overrides->state;
  +    a->options = overrides->options;
   
       if (a->options & OPTION_INHERIT) {
  -        a->rewritemaps  = append_arrays(p, overrides->rewritemaps,
  -                                        base->rewritemaps);
  -        a->rewriteconds = append_arrays(p, overrides->rewriteconds,
  -                                        base->rewriteconds);
  -        a->rewriterules = append_arrays(p, overrides->rewriterules,
  -                                        base->rewriterules);
  +        /* 
  +         *  local directives override 
  +         *  and anything else is inherited 
  +         */
  +        a->rewriteloglevel = overrides->rewriteloglevel != 0 ?
  +                             overrides->rewriteloglevel : base->rewriteloglevel;
  +        a->rewritelogfile  = overrides->rewritelogfile != NULL ?
  +                             overrides->rewritelogfile : base->rewritelogfile;
  +        a->rewritelogfp    = overrides->rewritelogfp != -1 ?
  +                             overrides->rewritelogfp : base->rewritelogfp;
  +        a->rewritelockfile = overrides->rewritelockfile != NULL ?
  +                             overrides->rewritelockfile : base->rewritelockfile;
  +        a->rewritelockfp   = overrides->rewritelockfp != -1 ?
  +                             overrides->rewritelockfp : base->rewritelockfp;
  +        a->rewritemaps     = append_arrays(p, overrides->rewritemaps,
  +                                           base->rewritemaps);
  +        a->rewriteconds    = append_arrays(p, overrides->rewriteconds,
  +                                           base->rewriteconds);
  +        a->rewriterules    = append_arrays(p, overrides->rewriterules,
  +                                           base->rewriterules);
       }
       else {
  -        a->rewritemaps  = overrides->rewritemaps;
  -        a->rewriteconds = overrides->rewriteconds;
  -        a->rewriterules = overrides->rewriterules;
  +        /* 
  +         *  local directives override 
  +         *  and anything else gets defaults 
  +         */
  +        a->rewriteloglevel = overrides->rewriteloglevel;
  +        a->rewritelogfile  = overrides->rewritelogfile;
  +        a->rewritelogfp    = overrides->rewritelogfp;
  +        a->rewritelockfile = overrides->rewritelockfile;
  +        a->rewritelockfp   = overrides->rewritelockfp;
  +        a->rewritemaps     = overrides->rewritemaps;
  +        a->rewriteconds    = overrides->rewriteconds;
  +        a->rewriterules    = overrides->rewriterules;
       }
   
       return (void *)a;
  
  
  

Mime
View raw message