httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_cache.c
Date Sat, 27 Sep 2003 18:17:10 GMT
striker     2003/09/27 11:17:10

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/experimental Tag: APACHE_2_0_BRANCH mod_cache.c
  Log:
  Backport from 2.1.
  
    *) mod_cache: Fix the cache code so that responses can be cached
       if they have an Expires header but no Etag or Last-Modified
       headers. PR 23130.
       [bjorn@exoweb.net]
  
  Reviewed by: Paul J. Reder, Roy T. Fielding, Brian Pane
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.159 +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.158
  retrieving revision 1.988.2.159
  diff -u -r1.988.2.158 -r1.988.2.159
  --- CHANGES	21 Sep 2003 21:23:34 -0000	1.988.2.158
  +++ CHANGES	27 Sep 2003 18:17:09 -0000	1.988.2.159
  @@ -1,5 +1,10 @@
   Changes with Apache 2.0.48
   
  +  *) mod_cache: Fix the cache code so that responses can be cached
  +     if they have an Expires header but no Etag or Last-Modified
  +     headers. PR 23130.
  +     [bjorn@exoweb.net]
  +
     *) mod_log_config: Fix %b log format to write really "-" when 0 bytes
        were sent (e.g. with 304 or 204 response codes).  [Astrid Ke▀ler]
   
  
  
  
  1.751.2.485 +1 -7      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.484
  retrieving revision 1.751.2.485
  diff -u -r1.751.2.484 -r1.751.2.485
  --- STATUS	27 Sep 2003 18:13:12 -0000	1.751.2.484
  +++ STATUS	27 Sep 2003 18:17:09 -0000	1.751.2.485
  @@ -65,12 +65,6 @@
     [ please place file names and revisions from HEAD here, so it is easy to
       identify exactly what the proposed changes are! ]
   
  -    * The cache code should be able to cache a response if it has an
  -      Expires header but no Etag or Last-Modified headers. This submitted
  -      patch (by bjorn@exoweb.net) resolves PR 23130.
  -      http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/experimental/mod_cache.c.diff?r1=1.76&r2=1.77
  -      +1: rederpj, fielding, brianp
  -
       * Modifies the cache code to be header-location agnostic. Also
         fixes a number of other cache code bugs related to PR 15852
         (an RFC 2616 violation).
  
  
  
  No                   revision
  No                   revision
  1.64.2.7  +5 -6      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.64.2.6
  retrieving revision 1.64.2.7
  diff -u -r1.64.2.6 -r1.64.2.7
  --- mod_cache.c	15 May 2003 17:51:58 -0000	1.64.2.6
  +++ mod_cache.c	27 Sep 2003 18:17:10 -0000	1.64.2.7
  @@ -540,14 +540,14 @@
           reason = "HTTP Status 304 Not Modified";
       }
       else if (r->status == HTTP_OK && lastmods == NULL && etag == NULL

  -             && (conf->no_last_mod_ignore ==0)) {
  -        /* 200 OK response from HTTP/1.0 and up without a Last-Modified
  -         * header/Etag 
  +             && (exps == NULL) && (conf->no_last_mod_ignore ==0)) {
  +        /* 200 OK response from HTTP/1.0 and up without Last-Modified,
  +         * Etag, or Expires headers.
            */
  -        /* XXX mod-include clears last_modified/expires/etags - this
  +        /* Note: mod-include clears last_modified/expires/etags - this
            * is why we have an optional function for a key-gen ;-) 
            */
  -        reason = "No Last-Modified or Etag header";
  +        reason = "No Last-Modified, Etag, or Expires headers";
       }
       else if (r->header_only) {
           /* HEAD requests */
  @@ -723,7 +723,6 @@
       info->request_time = r->request_time;
   
       /* check last-modified date */
  -    /* XXX FIXME we're referencing date on a path where we didn't set it */
       if (lastmod != APR_DATE_BAD && lastmod > date) {
           /* if it's in the future, then replace by date */
           lastmod = date;
  
  
  

Mime
View raw message