You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2002/04/06 15:20:48 UTC

cvs commit: apache-1.3/src/modules/proxy proxy_cache.c proxy_util.c

minfrin     02/04/06 05:20:48

  Modified:    src/modules/proxy proxy_cache.c proxy_util.c
  Log:
  Remove the last little bit of the multiple-headers bug in proxy. Before,
  only the last instance of a header would have been cached.
  
  Revision  Changes    Path
  1.83      +1 -5      apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- proxy_cache.c	25 Mar 2002 09:21:58 -0000	1.82
  +++ proxy_cache.c	6 Apr 2002 13:20:48 -0000	1.83
  @@ -872,16 +872,12 @@
           r->status = c->status;
   
           /* Prepare and send headers to client */
  -        ap_overlap_tables(r->headers_out, c->hdrs, AP_OVERLAP_TABLES_SET);
  +        ap_proxy_table_replace(r->headers_out, c->hdrs);
           /* make sure our X-Cache header does not stomp on a previous header */
           ap_table_mergen(r->headers_out, "X-Cache", c->xcache);
   
           /* content type is already set in the headers */
           r->content_type = ap_table_get(r->headers_out, "Content-Type");
  -
  -        /* cookies are special: they must not be merged (stupid browsers) */
  -        ap_proxy_table_unmerge(r->pool, r->headers_out, "Set-Cookie");
  -        ap_proxy_table_unmerge(r->pool, r->headers_out, "Set-Cookie2");
   
           ap_send_http_header(r);
   
  
  
  
  1.112     +0 -29     apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- proxy_util.c	6 Apr 2002 13:12:36 -0000	1.111
  +++ proxy_util.c	6 Apr 2002 13:20:48 -0000	1.112
  @@ -1519,35 +1519,6 @@
       return q;
   }
   
  -/* unmerge an element in the table */
  -void ap_proxy_table_unmerge(pool *p, table *t, char *key)
  -{
  -    long int offset = 0;
  -    long int count = 0;
  -    char *value = NULL;
  -
  -    /* get the value to unmerge */
  -    const char *initial = ap_table_get(t, key);
  -    if (!initial) {
  -        return;
  -    }
  -    value = ap_pstrdup(p, initial);
  -
  -    /* remove the value from the headers */
  -    ap_table_unset(t, key);
  -
  -    /* find each comma */
  -    while (value[count]) {
  -        if (value[count] == ',') {
  -            value[count] = 0;
  -            ap_table_add(t, key, value + offset);
  -            offset = count + 1;
  -        }
  -        count++;
  -    }
  -    ap_table_add(t, key, value + offset);
  -}
  -
   #if defined WIN32
   
   static DWORD tls_index;