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

1999-08-27 Thread stoddard
stoddard99/08/27 13:22:04

  Modified:src/modules/proxy proxy_cache.c proxy_connect.c proxy_util.c
  Log:
  Do not access fd directly, use ap_bfileno instead.
  
  Revision  ChangesPath
  1.63  +17 -18apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- proxy_cache.c 1999/08/02 10:45:33 1.62
  +++ proxy_cache.c 1999/08/27 20:21:49 1.63
  @@ -728,7 +728,7 @@
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
 "proxy: bad (short?) cache file: %s", c->filename);
if (i != 1) {
  - ap_pclosef(r->pool, cachefp->fd);
  + ap_pclosef(r->pool, ap_bfileno(cachefp, B_WR));
cachefp = NULL;
}
   }
  @@ -754,7 +754,7 @@
if ((q = ap_table_get(c->hdrs, "Expires")) != NULL)
ap_table_set(r->headers_out, "Expires", q);
}
  - ap_pclosef(r->pool, cachefp->fd);
  + ap_pclosef(r->pool, ap_bfileno(cachefp, B_WR));
Explain0("Use local copy, cached file hasn't changed");
return HTTP_NOT_MODIFIED;
}
  @@ -772,7 +772,7 @@
r->sent_bodyct = 1;
if (!r->header_only)
ap_proxy_send_fb(cachefp, r, NULL);
  - ap_pclosef(r->pool, cachefp->fd);
  + ap_pclosef(r->pool, ap_bfileno(cachefp, B_WR));
return OK;
   }
   
  @@ -876,7 +876,7 @@
Explain1("Response is not cacheable, unlinking %s", c->filename);
   /* close the file */
if (c->fp != NULL) {
  - ap_pclosef(r->pool, c->fp->fd);
  + ap_pclosef(r->pool, ap_bfileno(c->fp, B_WR));
c->fp = NULL;
}
   /* delete the previously cached file */
  @@ -973,17 +973,17 @@
   /* set any changed headers somehow */
   /* update dates and version, but not content-length */
if (lmod != c->lmod || expc != c->expire || date != c->date) {
  - off_t curpos = lseek(c->fp->fd, 0, SEEK_SET);
  + off_t curpos = lseek(ap_bfileno(c->fp, B_WR), 0, SEEK_SET);
if (curpos == -1)
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
 "proxy: error seeking on cache file %s",
 c->filename);
  - else if (write(c->fp->fd, buff, 35) == -1)
  + else if (write(ap_bfileno(c->fp, B_WR), buff, 35) == -1)
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
 "proxy: error updating cache file %s",
 c->filename);
}
  - ap_pclosef(r->pool, c->fp->fd);
  + ap_pclosef(r->pool, ap_bfileno(c->fp, B_WR));
Explain0("Remote document not modified, use local copy");
/* CHECKME: Is this right? Shouldn't we check IMS again here? */
return HTTP_NOT_MODIFIED;
  @@ -1005,25 +1005,24 @@
   /* set any changed headers somehow */
   /* update dates and version, but not content-length */
if (lmod != c->lmod || expc != c->expire || date != c->date) {
  - off_t curpos = lseek(c->fp->fd, 0, SEEK_SET);
  + off_t curpos = lseek(ap_bfileno(c->fp, B_WR), 0, SEEK_SET);
   
if (curpos == -1)
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
 "proxy: error seeking on cache file %s",
 c->filename);
  - else if (write(c->fp->fd, buff, 35) == -1)
  + else if (write(ap_bfileno(c->fp, B_WR), buff, 35) == -1)
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
 "proxy: error updating cache file %s",
 c->filename);
}
  - ap_pclosef(r->pool, c->fp->fd);
  + ap_pclosef(r->pool, ap_bfileno(c->fp, B_WR));
return OK;
}
   }
   /* new or modified file */
   if (c->fp != NULL) {
  - ap_pclosef(r->pool, c->fp->fd);
  - c->fp->fd = -1;
  + ap_pclosef(r->pool, ap_bfileno(c->fp, B_WR));
   }
   c->version = 0;
   ap_proxy_sec2hex(0, buff + 27);
  @@ -1057,7 +1056,7 @@
   if (ap_bvputs(c->fp, buff, "X-URL: ", c->url, "\n", NULL) == -1) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
 "proxy: error writing cache file(%s)", c->tempfile);
  - ap_pclosef(r->pool, c->fp->fd);
  + ap_pclosef(r->pool, ap_bfileno(c->fp, B_WR));
unlink(c->tempfile);
c->fp = NULL;
   }
  @@ -1082,7 +1081,7 @@
   if (c->len != -1) {
   /* file lengths don't match; don't cache it */
if (bc != c->len) {
  - ap_pclosef(c->req->pool, c->fp->fd);/* no need to flush */
  + ap_pclosef(c->req->pool, ap_bfilen

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

1999-06-10 Thread manoj
manoj   99/06/09 22:18:10

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Fix a seg fault when the proxy is enabled but CacheRoot isn't set.
  
  Revision  ChangesPath
  1.61  +3 -1  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.60
  retrieving revision 1.61
  diff -u -d -u -r1.60 -r1.61
  --- proxy_cache.c 1999/06/02 18:10:09 1.60
  +++ proxy_cache.c 1999/06/10 05:18:08 1.61
  @@ -279,7 +279,7 @@
   const struct cache_conf *conf = &pconf->cache;
   
   const char *cachedir = conf->root;
  -char *filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME 
) +1);
  +char *filename;
   struct stat buf;
   int timefd;
   time_t every = conf->gcinterval;
  @@ -287,6 +287,8 @@
   
   if (cachedir == NULL || every == -1)
   return 0;
  +
  +filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME ) +1);
   
   garbage_now = time(NULL);
   /* Usually, the modification time of /.time can only increase.
  
  
  


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

1999-06-02 Thread dgaudet
dgaudet 99/06/02 11:10:11

  Modified:src/modules/proxy proxy_cache.c
  Log:
  missing ap_unblock_alarms
  
  Revision  ChangesPath
  1.60  +0 -1  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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- proxy_cache.c 1999/04/22 14:27:51 1.59
  +++ proxy_cache.c 1999/06/02 18:10:09 1.60
  @@ -327,7 +327,6 @@
   else {
lastcheck = buf.st_mtime;   /* save the time */
   if (garbage_now < lastcheck + every) {
  -ap_unblock_alarms();
   return 0;
   }
   if (utime(filename, NULL) == -1)
  
  
  


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

1999-04-22 Thread rse
rse 99/04/22 07:27:52

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Ouch! With the recent commits to proxy_cache.c horrible bugs were introduced:
  First the variable filename was a global static variable and at the same time
  a local variable (``declaration of `filename' shadows global declaration'').
  Second, the filename allocation at two locations used a ``strlen(cachedir)''
  before ``cachedir'' was actually initialized!
  
  Revision  ChangesPath
  1.59  +4 -2  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.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- proxy_cache.c 1999/04/19 12:30:46 1.58
  +++ proxy_cache.c 1999/04/22 14:27:51 1.59
  @@ -103,7 +103,6 @@
   static long block_size = 512;/* this must be a power of 2 */
   static long61_t curbytes, cachesize;
   static time_t garbage_now, garbage_expire;
  -static char *filename;
   static mutex *garbage_mutex = NULL;
   
   
  @@ -348,10 +347,11 @@
   const struct cache_conf *conf = &pconf->cache;
   array_header *files;
   struct gc_ent *fent;
  +char *filename;
   int i;
  -char *filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
   
   cachedir = conf->root;
  +filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
   /* configured size is given in kB. Make it bytes, convert to long61_t: */
   cachesize.lower = cachesize.upper = 0;
   add_long61(&cachesize, conf->space << 10);
  @@ -416,8 +416,10 @@
   #endif
   struct gc_ent *fent;
   int nfiles = 0;
  +char *filename;
   
   ap_snprintf(cachedir, sizeof(cachedir), "%s%s", cachebasedir, 
cachesubdir);
  +filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
   Explain1("GC Examining directory %s", cachedir);
   dir = opendir(cachedir);
   if (dir == NULL) {
  
  
  


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

1999-04-19 Thread martin
martin  99/04/19 05:30:47

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Not every ANSI compliant compiler supports auto-arrays of dynamic size.
  Use defensive approach and allocate filename using ap_palloc().
  
  Revision  ChangesPath
  1.58  +2 -2  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- proxy_cache.c 1999/04/08 20:27:44 1.57
  +++ proxy_cache.c 1999/04/19 12:30:46 1.58
  @@ -280,7 +280,7 @@
   const struct cache_conf *conf = &pconf->cache;
   
   const char *cachedir = conf->root;
  -char filename[ strlen(cachedir) + strlen( DOT_TIME ) +1];
  +char *filename = ap_palloc(r->pool, strlen(cachedir) + strlen( DOT_TIME 
) +1);
   struct stat buf;
   int timefd;
   time_t every = conf->gcinterval;
  @@ -349,7 +349,7 @@
   array_header *files;
   struct gc_ent *fent;
   int i;
  -char filename[ strlen(cachedir) + HASH_LEN + 2];
  +char *filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
   
   cachedir = conf->root;
   /* configured size is given in kB. Make it bytes, convert to long61_t: */
  
  
  


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

1999-04-08 Thread dirkx
dirkx   99/04/08 13:27:46

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Modified cache garbage control to first check if it
  actually should run, based on the time of last run,
  and to try to get a lock; prior to actually forking
  and doing the real cleanup. This effectively avoids
  a fork after each and every request; and limites
  the spawning to just once every few hours.
  
  Revision  ChangesPath
  1.57  +77 -46apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- proxy_cache.c 1999/03/23 14:48:09 1.56
  +++ proxy_cache.c 1999/04/08 20:27:44 1.57
  @@ -102,7 +102,7 @@
   #define ROUNDUP2BLOCKS(_bytes) (((_bytes)+block_size-1) & ~(block_size-1))
   static long block_size = 512;/* this must be a power of 2 */
   static long61_t curbytes, cachesize;
  -static time_t every, garbage_now, garbage_expire;
  +static time_t garbage_now, garbage_expire;
   static char *filename;
   static mutex *garbage_mutex = NULL;
   
  @@ -119,6 +119,7 @@
   static int sub_garbage_coll(request_rec *r, array_header *files,
const char *cachedir, const char *cachesubdir);
   static void help_proxy_garbage_coll(request_rec *r);
  +static int should_proxy_garbage_coll(request_rec *r);
   #if !defined(WIN32) && !defined(MPE) && !defined(OS2)
   static void detached_proxy_garbage_coll(request_rec *r);
   #endif
  @@ -138,10 +139,11 @@
   (void) ap_release_mutex(garbage_mutex);
   
   ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
  +if (should_proxy_garbage_coll(r))
   #if !defined(WIN32) && !defined(MPE) && !defined(OS2)
  -detached_proxy_garbage_coll(r);
  +detached_proxy_garbage_coll(r);
   #else
  -help_proxy_garbage_coll(r);
  +help_proxy_garbage_coll(r);
   #endif
   ap_unblock_alarms();
   
  @@ -205,6 +207,10 @@
   int status;
   pid_t pgrp;
   
  +#if 0
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, r->server,
  +  "proxy: Guess what; we fork() again...");
  +#endif
   switch (pid = fork()) {
case -1:
ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  @@ -264,27 +270,25 @@
   }
   #endif /* ndef WIN32 */
   
  -static void help_proxy_garbage_coll(request_rec *r)
  +#define DOT_TIME "/.time"/* marker */
  +
  +static int should_proxy_garbage_coll(request_rec *r)
   {
  -const char *cachedir;
   void *sconf = r->server->module_config;
   proxy_server_conf *pconf =
   (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
   const struct cache_conf *conf = &pconf->cache;
  -array_header *files;
  -struct stat buf;
  -struct gc_ent *fent;
  -int i, timefd;
  -static time_t lastcheck = BAD_DATE;  /* static (per-process) 
data!!! */
   
  -cachedir = conf->root;
  -/* configured size is given in kB. Make it bytes, convert to long61_t: */
  -cachesize.lower = cachesize.upper = 0;
  -add_long61(&cachesize, conf->space << 10);
  -every = conf->gcinterval;
  +const char *cachedir = conf->root;
  +char filename[ strlen(cachedir) + strlen( DOT_TIME ) +1];
  +struct stat buf;
  +int timefd;
  +time_t every = conf->gcinterval;
  +static time_t lastcheck = BAD_DATE; /* static (per-process) 
data!!! */
   
   if (cachedir == NULL || every == -1)
  - return;
  +return 0;
  +
   garbage_now = time(NULL);
   /* Usually, the modification time of /.time can only increase.
* Thus, even with several child processes having their own copy of
  @@ -292,41 +296,68 @@
* for GC yet.
*/
   if (garbage_now != -1 && lastcheck != BAD_DATE && garbage_now < 
lastcheck + every)
  - return;
  +return 0;
   
  -ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
  +strcpy(filename,cachedir);
  +strcat(filename,DOT_TIME);
   
  -filename = ap_palloc(r->pool, strlen(cachedir) + HASH_LEN + 2);
  -strcpy(filename, cachedir);
  -strcat(filename, "/.time");
  -if (stat(filename, &buf) == -1) {/* does not exist */
  - if (errno != ENOENT) {
  - ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  -  "proxy: stat(%s)", filename);
  - ap_unblock_alarms();
  - return;
  - }
  - if ((timefd = creat(filename, 0666)) == -1) {
  - if (errno != EEXIST)
  - ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  -  "proxy: creat(%s)", filename);
  - else
  - lastcheck = garbage_now;/* someone else got in there */
  - ap_unblock_alarms();
  - return;
  - }
  - close(timefd

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

1999-03-23 Thread martin
martin  99/03/23 06:48:10

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Fix compiler warning for old SINIX-D
  
  Revision  ChangesPath
  1.56  +1 -1  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- proxy_cache.c 1999/02/07 20:48:31 1.55
  +++ proxy_cache.c 1999/03/23 14:48:09 1.56
  @@ -777,7 +777,7 @@
   int ap_proxy_cache_update(cache_req *c, table *resp_hdrs,
   const int is_HTTP1, int nocache)
   {
  -#ifdef ULTRIX_BRAIN_DEATH
  +#if defined(ULTRIX_BRAIN_DEATH) || defined(SINIX_D_RESOLVER_BUG)
 extern char *mktemp(char *template);
   #endif 
   request_rec *r = c->req;
  
  
  


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

1998-07-28 Thread dgaudet
dgaudet 98/07/28 09:59:11

  Modified:src  CHANGES
   src/modules/proxy proxy_cache.c
  Log:
  fix a segfault in the proxy on OS/2
  
  Submitted by: Brian Havard
  
  Revision  ChangesPath
  1.990 +2 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.989
  retrieving revision 1.990
  diff -u -r1.989 -r1.990
  --- CHANGES   1998/07/27 14:58:17 1.989
  +++ CHANGES   1998/07/28 16:59:09 1.990
  @@ -1,5 +1,7 @@
   Changes with Apache 1.3.2
   
  +  *) Fix a segfault in the proxy on OS/2.  [Brian Havard]
  +
 *) Fix Win32 part of ap_spawn_child() by providing a reasonable child_info
structure instead of just NULL. This fixes at least the RewriteMap
programs under Win32. [Marco De Michele <[EMAIL PROTECTED]>] PR#2483
  
  
  
  1.47  +2 -1  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- proxy_cache.c 1998/07/09 19:45:56 1.46
  +++ proxy_cache.c 1998/07/28 16:59:11 1.47
  @@ -846,7 +846,8 @@
c->fp = NULL;
}
   /* delete the previously cached file */
  - unlink(c->filename);
  +if (c->filename)
  +unlink(c->filename);
return DECLINED;/* send data to client but not cache */
   }
   
  
  
  


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

1998-07-09 Thread rse
rse 98/07/09 02:52:22

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Add one more level of parenthesis because the (long) cast has to
  apply to the complete expression or GCC still complains with:
  
  proxy_cache.c:334: warning: long int format, different type arg (arg 6)
  proxy_cache.c:365: warning: long int format, different type arg (arg 6)
  
  Revision  ChangesPath
  1.45  +2 -2  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- proxy_cache.c 1998/06/13 15:22:59 1.44
  +++ proxy_cache.c 1998/07/09 09:52:20 1.45
  @@ -331,7 +331,7 @@
   if (cmp_long61(&curbytes, &cachesize) < 0L) {
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (nothing deleted)",
  -  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
  +  
(long)(((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space));
ap_unblock_alarms();
return;
   }
  @@ -362,7 +362,7 @@
   
   ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (%d deleted)",
  -  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
  +  
(long)(((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space), i);
   ap_unblock_alarms();
   }
   
  
  
  


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

1998-06-09 Thread martin
martin  98/06/09 14:17:55

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Add casts for systems where sizeof(off_t) > sizeof(long).
  Sorry, but I see no other portable way to do it :-(
  Submitted by: Ralf Engelschall <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.43  +3 -3  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -u -r1.42 -r1.43
  --- proxy_cache.c 1998/06/02 12:50:46 1.42
  +++ proxy_cache.c 1998/06/09 21:17:54 1.43
  @@ -331,7 +331,7 @@
   if (cmp_long61(&curbytes, &cachesize) < 0L) {
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (nothing deleted)",
  -  
((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
  +  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
ap_unblock_alarms();
return;
   }
  @@ -362,7 +362,7 @@
   
   ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (%d deleted)",
  -  
((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
  +  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
   ap_unblock_alarms();
   }
   
  @@ -594,7 +594,7 @@
q = ap_proxy_get_header(c->hdrs, "Content-Length");
if (q == NULL) {
strp = ap_palloc(p, 15);
  - ap_snprintf(strp, 15, "%lu", c->len);
  + ap_snprintf(strp, 15, "%lu", (unsigned long)c->len);
ap_proxy_add_header(c->hdrs, "Content-Length", strp, HDR_REP);
}
   }
  
  
  


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

1998-05-15 Thread martin
martin  98/05/15 02:01:39

  Modified:src  CHANGES
   src/modules/proxy proxy_cache.c
  Log:
  Updated cache copies got an inconsistent content-length (that of the old
  copy). This resulted in repeated loads from the origin server instead of
  using the cached copy.
  
  PR: 2094
  Submitted by: Ernst Kloppenburg <[EMAIL PROTECTED]>
  Reviewed by: Martin Kraemer
  
  Revision  ChangesPath
  1.848 +5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.847
  retrieving revision 1.848
  diff -u -u -r1.847 -r1.848
  --- CHANGES   1998/05/12 12:13:50 1.847
  +++ CHANGES   1998/05/15 09:01:34 1.848
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b7
   
  +  *) The proxy cache would store an incorrect content-length in the cached
  + file copy after a cache update. That resulted in repeated fetching
  + of the original copy instead of using the cached copy.
  + [Ernst Kloppenburg <[EMAIL PROTECTED]>] PR#2094
  +
 *) The Makefiles assumed that DSO files are build via $(LD). This
is broken for two reasons: First we never defined at least LD=ld
somewhere to make sure this works (it was silently assumed that most 
Make
  
  
  
  1.39  +1 -1  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.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- proxy_cache.c 1998/05/02 11:15:12 1.38
  +++ proxy_cache.c 1998/05/15 09:01:38 1.39
  @@ -770,7 +770,7 @@
   }
   
   /* get the content-length header */
  -clen = ap_proxy_get_header(c->hdrs, "Content-Length");
  +clen = ap_proxy_get_header(resp_hdrs, "Content-Length");
   if (clen == NULL)
c->len = -1;
   else
  
  
  


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

1998-02-13 Thread martin
martin  98/02/13 01:57:28

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Debug code referenced invalid structure tag
  
  Revision  ChangesPath
  1.34  +1 -1  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.33
  retrieving revision 1.34
  diff -u -u -r1.33 -r1.34
  --- proxy_cache.c 1998/01/24 20:43:43 1.33
  +++ proxy_cache.c 1998/02/13 09:57:27 1.34
  @@ -200,7 +200,7 @@
   for (i = 0; i < files->nelts; i++) {
fent = elts[i];
sprintf(filename, "%s%s", cachedir, fent->file);
  - Explain3("GC Unlinking %s (expiry %ld, garbage_now %ld)", filename, 
fent->garbage_expire, garbage_now);
  + Explain3("GC Unlinking %s (expiry %ld, garbage_now %ld)", filename, 
fent->expire, garbage_now);
   #if TESTING
fprintf(stderr, "Would unlink %s\n", filename);
   #else