httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_disk_cache.c
Date Wed, 13 Oct 2004 16:40:57 GMT
minfrin     2004/10/13 09:40:57

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/experimental Tag: APACHE_2_0_BRANCH mod_disk_cache.c
  Log:
  Do not store aborted content.
  PR:	21492
  Submitted by:	R|diger Pl|m <r.pluem t-online.de>
  Reviewed by:	stoddard, jerenkrantz, minfrin, jim
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.369 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.368
  retrieving revision 1.988.2.369
  diff -u -r1.988.2.368 -r1.988.2.369
  --- CHANGES	13 Oct 2004 16:32:03 -0000	1.988.2.368
  +++ CHANGES	13 Oct 2004 16:40:52 -0000	1.988.2.369
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.53
   
  +  *) mod_disk_cache: Do not store aborted content.  PR 21492.
  +     [Rüiger Plü <r.pluem t-online.de>]
  +
     *) mod_disk_cache: Correctly store cached content type.  PR 30278.
        [Rüiger Plü <r.pluem t-online.de>]
   
  
  
  
  1.751.2.1115 +1 -5      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.1114
  retrieving revision 1.751.2.1115
  diff -u -r1.751.2.1114 -r1.751.2.1115
  --- STATUS	13 Oct 2004 16:32:05 -0000	1.751.2.1114
  +++ STATUS	13 Oct 2004 16:40:54 -0000	1.751.2.1115
  @@ -115,10 +115,6 @@
          jorton replies: it does indeed, hang on...
          +1: jorton
   
  -    *) Do not store aborted content. PR 21492.
  -         modules/experimental/mod_disk_cache.c?r1=1.63&r2=1.64
  -       +1: stoddard, jerenkrantz, minfrin, jim
  -
       *) Try to correctly follow RFC 2616 13.3 on validating stale cache
          responses by teaching mod_cache's cache_select_url and
          cache_save_filter how to deal with this corner case.
  
  
  
  No                   revision
  No                   revision
  1.45.2.11 +16 -0     httpd-2.0/modules/experimental/mod_disk_cache.c
  
  Index: mod_disk_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
  retrieving revision 1.45.2.10
  retrieving revision 1.45.2.11
  diff -u -r1.45.2.10 -r1.45.2.11
  --- mod_disk_cache.c	13 Oct 2004 16:32:06 -0000	1.45.2.10
  +++ mod_disk_cache.c	13 Oct 2004 16:40:57 -0000	1.45.2.11
  @@ -704,6 +704,22 @@
        */
       if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
           if (h->cache_obj->info.len <= 0) {
  +          /* If the target value of the content length is unknown
  +           * (h->cache_obj->info.len <= 0), check if connection has been
  +           * aborted by client to avoid caching incomplete request bodies.
  +           *
  +           * This can happen with large responses from slow backends like
  +           * Tomcat via mod_jk.
  +           */
  +          if (r->connection->aborted) {
  +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
  +                         "disk_cache: Discarding body for URL %s "
  +                         "because connection has been aborted.",
  +                         h->cache_obj->key);
  +            /* Remove the intermediate cache file and return non-APR_SUCCESS */
  +            file_cache_errorcleanup(dobj, r);
  +            return APR_EGENERAL;
  +          }
             /* XXX Fixme: file_size isn't constrained by size_t. */
             h->cache_obj->info.len = dobj->file_size;
           }
  
  
  

Mime
View raw message