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/proxy proxy_cache.c
Date Sat, 24 Jan 1998 20:43:44 GMT
dgaudet     98/01/24 12:43:44

  Modified:    src/modules/proxy proxy_cache.c
  Log:
  When deleting a value from a table, use table_unset() not table_set(key,NULL).
  
  The proxy has all of its own "table" manipulation routines... like it has
  struct hdr_entry, and proxy_get_header() and all this crap.  But it was
  mixing the use of the real table routines and its own routines.  Clean
  this up.  (Ultimately someone should clean it up to use the real table
  routines, I can't see why it doesn't.)
  
  Revision  Changes    Path
  1.33      +7 -5      apachen/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- proxy_cache.c	1998/01/07 16:46:36	1.32
  +++ proxy_cache.c	1998/01/24 20:43:43	1.33
  @@ -476,7 +476,7 @@
   int proxy_cache_check(request_rec *r, char *url, struct cache_conf *conf,
   		      struct cache_req **cr)
   {
  -    char hashfile[66], *imstr, *pragma, *p, *auth;
  +    char hashfile[66], *imstr, *pragma, *auth;
       struct cache_req *c;
       time_t now;
       BUFF *cachefp;
  @@ -499,7 +499,7 @@
   	imstr = proxy_date_canon(r->pool, imstr);
   	c->ims = parseHTTPdate(imstr);
   	if (c->ims == BAD_DATE)	/* bad or out of range date; remove it */
  -	    table_set(r->headers_in, "If-Modified-Since", NULL);
  +	    table_unset(r->headers_in, "If-Modified-Since");
       }
   
   /* find the filename for this cache entry */
  @@ -563,9 +563,11 @@
   		/* CHECKME: surely this was wrong? (Ben)
   		   p = table_get(r->headers_in, "Expires");
   		 */
  -		p = table_get(c->hdrs, "Expires");
  -		if (p != NULL)
  -		    table_set(r->headers_out, "Expires", p);
  +		struct hdr_entry *q;
  +
  +		q = proxy_get_header(c->hdrs, "Expires");
  +		if (q != NULL && q->value != NULL)
  +		    table_set(r->headers_out, "Expires", q->value);
   	    }
   	    pclosef(r->pool, cachefp->fd);
   	    Explain0("Use local copy, cached file hasn't changed");
  
  
  

Mime
View raw message