httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/modules/standard mod_rewrite.c
Date Sun, 11 Jan 1998 20:55:23 GMT
dgaudet     98/01/11 12:55:23

  Modified:    .        STATUS
               src      CHANGES
               src/main http_request.c util_script.c
               src/modules/standard mod_rewrite.c
  Log:
  clean up some unneeded pstrdup()s in calls to table_* functions
  
  Reviewed by:	Marc Slemko, Paul Sutton, Ralf S. Engelschall
  
  Revision  Changes    Path
  1.75      +1 -4      apachen/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- STATUS	1998/01/11 20:24:57	1.74
  +++ STATUS	1998/01/11 20:55:15	1.75
  @@ -76,12 +76,9 @@
       * WIN32: fix CGI scripts called w/o '=' in path info  PR#1591
       * Doug's [PATCH] add -c and -C switches (take 3)
       * Paul's WIN32: patch to allow for Doug's -c option
  +    * Dean's [PATCH] unneeded pstrdup()s (in table_*() calls)
   
   Available Patches:
  -
  -    * Dean's [PATCH] unneeded pstrdup()s (in table_*() calls)
  -	<Pine.LNX.3.95dg3.980111035658.25014B-100000@twinlark.arctic.org>
  -	Status: Dean +1
   
       * Dean's [PATCH] MONCONTROL for profiling children
   	<Pine.LNX.3.95dg3.980111040040.25014C-100000@twinlark.arctic.org>
  
  
  
  1.563     +4 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.562
  retrieving revision 1.563
  diff -u -r1.562 -r1.563
  --- CHANGES	1998/01/11 20:24:58	1.562
  +++ CHANGES	1998/01/11 20:55:16	1.563
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b4
   
  +  *) pstrdup() is implicit in calls to table_* functions, so there's
  +     no need to do it before calling.  Clean up a few cases.
  +     [Marc Slemko, Dean Gaudet]
  +
     *) new -C and -c command line arguments
        usage:
        -C "directive" : process directive before reading config files
  
  
  
  1.99      +1 -1      apachen/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- http_request.c	1998/01/08 03:56:08	1.98
  +++ http_request.c	1998/01/11 20:55:18	1.99
  @@ -1217,7 +1217,7 @@
       new->read_length     = r->read_length;     /* We can only read it once */
   
       ap_snprintf(t, sizeof(t), "%d", r->status);
  -    table_set(new->subprocess_env, "REDIRECT_STATUS", pstrdup(r->pool, t));
  +    table_set(new->subprocess_env, "REDIRECT_STATUS", t);
   
       /*
        * XXX: hmm.  This is because mod_setenvif and mod_unique_id really need
  
  
  
  1.90      +1 -1      apachen/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/util_script.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- util_script.c	1998/01/10 05:43:33	1.89
  +++ util_script.c	1998/01/11 20:55:19	1.90
  @@ -348,7 +348,7 @@
   #ifdef WIN32
   	    /* We need to make this a real Windows path name */
   	    GetFullPathName(pt, HUGE_STRING_LEN, buffer, NULL);
  -	    table_set(e, "PATH_TRANSLATED", pstrdup(r->pool, buffer));
  +	    table_set(e, "PATH_TRANSLATED", buffer);
   #else
   	    table_set(e, "PATH_TRANSLATED", pt);
   #endif
  
  
  
  1.59      +5 -8      apachen/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_rewrite.c	1998/01/07 16:46:55	1.58
  +++ mod_rewrite.c	1998/01/11 20:55:21	1.59
  @@ -908,15 +908,13 @@
            var = pstrcat(r->pool, "REDIRECT_", ENVVAR_SCRIPT_URL, NULL);
            var = table_get(r->subprocess_env, var);
            if (var == NULL) 
  -             table_set(r->subprocess_env, ENVVAR_SCRIPT_URL,
  -                       pstrdup(r->pool, r->uri));
  +             table_set(r->subprocess_env, ENVVAR_SCRIPT_URL, r->uri);
            else 
  -             table_set(r->subprocess_env, ENVVAR_SCRIPT_URL,
  -                       pstrdup(r->pool, var));
  +             table_set(r->subprocess_env, ENVVAR_SCRIPT_URL, var);
       } 
       else {
            var = table_get(r->main->subprocess_env, ENVVAR_SCRIPT_URL);
  -         table_set(r->subprocess_env, ENVVAR_SCRIPT_URL, pstrdup(r->pool, var));
  +         table_set(r->subprocess_env, ENVVAR_SCRIPT_URL, var);
       }
   
       /*
  @@ -945,7 +943,7 @@
   #else
       var = pstrcat(r->pool, "http://", thisserver, thisport, thisurl, NULL);
   #endif
  -    table_set(r->subprocess_env, ENVVAR_SCRIPT_URI, pstrdup(r->pool, var));
  +    table_set(r->subprocess_env, ENVVAR_SCRIPT_URI, var);
   
   
       /* if filename was not initially set,
  @@ -3484,8 +3482,7 @@
           var[n] = '\0';
           strncpy(val, cp+1, sizeof(val)-1);
           EOS_PARANOIA(val);
  -        table_set(r->subprocess_env, pstrdup(r->pool, var), 
  -                  pstrdup(r->pool, val));
  +        table_set(r->subprocess_env, var, val);
           rewritelog(r, 5, "setting env variable '%s' to '%s'", var, val);
       }
   }
  
  
  

Mime
View raw message