httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache/src CHANGES alloc.c
Date Tue, 20 Jan 1998 00:59:13 GMT
dgaudet     98/01/19 16:59:12

  Modified:    .        Tag: APACHE_1_2_X STATUS
               src      Tag: APACHE_1_2_X CHANGES alloc.c
  Log:
  Make table_{set,unset}() deal correctly with multiple occurrences of the
  same key.
  PR: 1604
  Submitted by: Stephen Scheck <sscheck@infonex.net>, Ben
  Reviewed by:  Ben Laurie, Dean Gaudetj
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.20  +1 -0      apache/Attic/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apache/Attic/STATUS,v
  retrieving revision 1.1.2.19
  retrieving revision 1.1.2.20
  diff -u -r1.1.2.19 -r1.1.2.20
  --- STATUS	1998/01/20 00:54:37	1.1.2.19
  +++ STATUS	1998/01/20 00:59:08	1.1.2.20
  @@ -17,6 +17,7 @@
       * proxy was sending HTTP/1.1 responses in error
       * PR#1500: allocate r->connection->user in correct pool
       * PR#1366: send_fd_length did not calculate total_bytes_sent properly
  +    * PR#1604: table_{set,unset} didn't deal correctly with multiple keys
   
   Available:
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.286.2.72 +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.71
  retrieving revision 1.286.2.72
  diff -u -r1.286.2.71 -r1.286.2.72
  --- CHANGES	1998/01/20 00:54:38	1.286.2.71
  +++ CHANGES	1998/01/20 00:59:10	1.286.2.72
  @@ -1,4 +1,8 @@
   Changes with Apache 1.2.6
  +
  +  *) table_set() and table_unset() did not deal correctly with
  +     multiple occurrences of the same key. [Stephen Scheck
  +    <sscheck@infonex.net>, Ben Laurie] PR#1604
     
     *) send_fd_length() did not calculate total_bytes_sent properly in error
        cases.  [Ben Reser <breser@regnow.com>] PR#1366
  
  
  
  1.28.2.2  +12 -3     apache/src/alloc.c
  
  Index: alloc.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/alloc.c,v
  retrieving revision 1.28.2.1
  retrieving revision 1.28.2.2
  diff -u -r1.28.2.1 -r1.28.2.2
  --- alloc.c	1997/06/27 01:47:44	1.28.2.1
  +++ alloc.c	1998/01/20 00:59:11	1.28.2.2
  @@ -578,11 +578,12 @@
       table_entry *elts = (table_entry *)t->elts;
       int done = 0;
   
  -    for (i = 0; i < t->nelts; ++i)
  +    for (i = 0; i < t->nelts;) {
   	if (!strcasecmp (elts[i].key, key)) {
   	    if (!done) {
   	        elts[i].val = pstrdup(t->pool, val);
   	        done = 1;
  +		++i;
   	    }
   	    else {     /* delete an extraneous element */
                   for (j = i, k = i + 1; k < t->nelts; ++j, ++k) {
  @@ -592,6 +593,10 @@
                   --t->nelts;
   	    }
   	}
  +	else {
  +	    ++i;
  +	}
  +    }
   
       if (!done) {
           elts = (table_entry *)push_array(t);
  @@ -605,7 +610,7 @@
       register int i, j, k;   
       table_entry *elts = (table_entry *)t->elts;
    
  -    for (i = 0; i < t->nelts; ++i)
  +    for (i = 0; i < t->nelts;) {
           if (!strcasecmp (elts[i].key, key)) {
    
               /* found an element to skip over
  @@ -619,7 +624,11 @@
               }
               --t->nelts;
           }
  -}     
  +	else {
  +	    ++i;
  +	}
  +    }
  +}
   
   void table_merge (table *t, const char *key, const char *val)
   {
  
  
  

Mime
View raw message