httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rede...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_cache.c
Date Thu, 21 Nov 2002 21:52:47 GMT
rederpj     2002/11/21 13:52:47

  Modified:    .        CHANGES
               modules/experimental mod_cache.c
  Log:
  Fix for PR 14556. The expiry calculations in mod_cache were
  trying to perform "now + ((date - lastmod) * factor)" where
  date == lastmod resulting in "now + 0". The code now follows
  the else path (using the default expiration) if date is
  equal to lastmod. [rx@armstrike.com (Sergey), Paul J. Reder]
  
  Revision  Changes    Path
  1.987     +6 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.986
  retrieving revision 1.987
  diff -u -r1.986 -r1.987
  --- CHANGES	18 Nov 2002 21:43:13 -0000	1.986
  +++ CHANGES	21 Nov 2002 21:52:46 -0000	1.987
  @@ -1,5 +1,11 @@
   Changes with Apache 2.0.44
   
  +  *) Fix for PR 14556. The expiry calculations in mod_cache were
  +     trying to perform "now + ((date - lastmod) * factor)" where
  +     date == lastmod resulting in "now + 0". The code now follows
  +     the else path (using the default expiration) if date is
  +     equal to lastmod. [rx@armstrike.com (Sergey), Paul J. Reder]
  +
     *) Use AP_DECLARE in the debug versions of ap_strXXX in case the
        default calling convention is not the same as the one used by
        AP_DECLARE.  [Juan Rivera <Juan.Rivera@citrix.com>]
  
  
  
  1.64      +5 -1      httpd-2.0/modules/experimental/mod_cache.c
  
  Index: mod_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_cache.c	19 Nov 2002 19:32:37 -0000	1.63
  +++ mod_cache.c	21 Nov 2002 21:52:47 -0000	1.64
  @@ -850,7 +850,11 @@
        *      expire date = now + defaultexpire
        */
       if (exp == APR_DATE_BAD) {
  -        if (lastmod != APR_DATE_BAD) {
  +        /* if lastmod == date then you get 0*conf->factor which results in
  +         *   an expiration time of now. This causes some problems with
  +         *   freshness calculations, so we choose the else path...
  +         */
  +        if ((lastmod != APR_DATE_BAD) && (lastmod < date)) {
               apr_time_t x = (apr_time_t) ((date - lastmod) * conf->factor);
               if (x > conf->maxex) {
                   x = conf->maxex;
  
  
  

Mime
View raw message