On 10/12/2010 01:32 AM, minf...@apache.org wrote:
> Author: minfrin
> Date: Mon Oct 11 23:32:56 2010
> New Revision: 1021546
> 
> URL: http://svn.apache.org/viewvc?rev=1021546&view=rev
> Log:
> mod_cache: Optionally serve stale data when a revalidation returns a
> 5xx response, controlled by the CacheStaleOnError directive.
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/docs/manual/mod/mod_cache.xml
>     httpd/httpd/trunk/include/ap_mmn.h
>     httpd/httpd/trunk/modules/cache/cache_util.h
>     httpd/httpd/trunk/modules/cache/mod_cache.c
>     httpd/httpd/trunk/modules/cache/mod_cache.h
>     httpd/httpd/trunk/modules/cache/mod_disk_cache.c
> 

> Modified: httpd/httpd/trunk/modules/cache/mod_disk_cache.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_disk_cache.c?rev=1021546&r1=1021545&r2=1021546&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Mon Oct 11 23:32:56 2010
> @@ -860,16 +860,14 @@ static apr_status_t recall_headers(cache
>  
>  static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, 
> apr_bucket_brigade *bb)
>  {
> -    apr_bucket *e;
>      disk_cache_object_t *dobj = (disk_cache_object_t*) h->cache_obj->vobj;
>  
>      if (dobj->data.fd) {
> -        apr_brigade_insert_file(bb, dobj->data.fd, 0, dobj->file_size, p);
> +        apr_bucket *e = apr_bucket_file_create(dobj->data.fd, 0,
> +                dobj->file_size, p, bb->bucket_alloc);
> +        APR_BRIGADE_INSERT_HEAD(bb, e);
>      }
>  
> -    e = apr_bucket_eos_create(bb->bucket_alloc);
> -    APR_BRIGADE_INSERT_TAIL(bb, e);
> -
>      return APR_SUCCESS;
>  }


What is the purpose of these changes? What makes the need for 
apr_brigade_insert_file
go away and why don't we add an eos any longer?

Regards

RĂ¼diger

Reply via email to