httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Sun, 03 Aug 2003 18:38:14 GMT
nd          2003/08/03 11:38:14

  Modified:    modules/mappers mod_rewrite.c
  Log:
  incorporate the add_env_variable function in do_expand_env.
  I see no real reason to use an extra function call here (other than
  decreasing performance :)
  
  Revision  Changes    Path
  1.211     +10 -13    httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- mod_rewrite.c	3 Aug 2003 17:59:55 -0000	1.210
  +++ mod_rewrite.c	3 Aug 2003 18:38:14 -0000	1.211
  @@ -2111,23 +2111,20 @@
   /*
    * perform all the expansions on the environment variables
    */
  -static void add_env_variable(request_rec *r, char *s)
  -{
  -    char *val;
  -
  -    if ((val = ap_strchr(s, ':')) != NULL) {
  -        *val++ = '\0';
  -
  -        apr_table_set(r->subprocess_env, s, val);
  -        rewritelog(r, 5, "setting env variable '%s' to '%s'", s, val);
  -    }
  -}
  -
   static void do_expand_env(request_rec *r, data_item *env,
                             backrefinfo *briRR, backrefinfo *briRC)
   {
  +    char *name, *val;
  +
       while (env) {
  -        add_env_variable(r, do_expand(r, env->data, briRR, briRC));
  +        name = do_expand(r, env->data, briRR, briRC);
  +        if ((val = ap_strchr(name, ':')) != NULL) {
  +            *val++ = '\0';
  +
  +            apr_table_set(r->subprocess_env, name, val);
  +            rewritelog(r, 5, "setting env variable '%s' to '%s'", name, val);
  +        }
  +
           env = env->next;
       }
   
  
  
  

Mime
View raw message