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 Wed, 30 Jul 2003 21:04:31 GMT
nd          2003/07/30 14:04:31

  Modified:    modules/mappers mod_rewrite.c
  Log:
  remove some unnecessary memory operations
  
  Revision  Changes    Path
  1.208     +8 -8      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.207
  retrieving revision 1.208
  diff -u -r1.207 -r1.208
  --- mod_rewrite.c	30 Jul 2003 20:55:35 -0000	1.207
  +++ mod_rewrite.c	30 Jul 2003 21:04:31 -0000	1.208
  @@ -3130,7 +3130,7 @@
       case 't':
       case 'T':
           if (!*key || !strcasecmp(key, "ype")) {            /* type */
  -            cfg->forced_mimetype = apr_pstrdup(p, val);
  +            cfg->forced_mimetype = val;
               ap_str_tolower(cfg->forced_mimetype);
           }
           break;
  @@ -3185,8 +3185,8 @@
           }
       }
   
  -    /*  arg1: the pattern
  -     *  try to compile the regexp to test if is ok
  +    /* arg1: the pattern
  +     * try to compile the regexp to test if is ok
        */
       if (*a1 == '!') {
           newrule->flags |= RULEFLAG_NOTMATCH;
  @@ -3202,11 +3202,11 @@
                              a1, "'", NULL);
       }
   
  -    newrule->pattern = apr_pstrdup(cmd->pool, a1);
  +    newrule->pattern = a1;
       newrule->regexp  = regexp;
   
  -    /*  arg2: the output string */
  -    newrule->output = apr_pstrdup(cmd->pool, a2);
  +    /* arg2: the output string */
  +    newrule->output = a2;
   
       /* now, if the server or per-dir config holds an
        * array of RewriteCond entries, we take it for us
  @@ -3215,12 +3215,12 @@
       if (cmd->path == NULL) {  /* is server command */
           newrule->rewriteconds   = sconf->rewriteconds;
           sconf->rewriteconds = apr_array_make(cmd->pool, 2,
  -                                            sizeof(rewritecond_entry));
  +                                             sizeof(rewritecond_entry));
       }
       else {                    /* is per-directory command */
           newrule->rewriteconds   = dconf->rewriteconds;
           dconf->rewriteconds = apr_array_make(cmd->pool, 2,
  -                                            sizeof(rewritecond_entry));
  +                                             sizeof(rewritecond_entry));
       }
   
       return NULL;
  
  
  

Mime
View raw message