httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_disk_cache.c
Date Mon, 02 Aug 2004 18:39:10 GMT
jerenkrantz    2004/08/02 11:39:09

  Modified:    modules/experimental mod_disk_cache.c
  Log:
  * modules/experimental/mod_disk_cache.c (open_entity): Allow the data file to
    be sent via sendfile() and allow the header file to be buffered.
  
  Reviewed by:	Bill Stoddard
  
  Revision  Changes    Path
  1.54      +8 -2      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.53
  retrieving revision 1.54
  diff -u -u -r1.53 -r1.54
  --- mod_disk_cache.c	2 Aug 2004 17:32:31 -0000	1.53
  +++ mod_disk_cache.c	2 Aug 2004 18:39:09 -0000	1.54
  @@ -370,6 +370,7 @@
       cache_object_t *obj;
       cache_info *info;
       disk_cache_object_t *dobj;
  +    int flags;
   
       h->cache_obj = NULL;
   
  @@ -393,14 +394,19 @@
                             conf->cache_root, key);
   
       /* Open the data file */
  -    rc = apr_file_open(&fd, data, APR_READ|APR_BINARY, 0, r->pool);
  +    flags = APR_READ|APR_BINARY;
  +#ifdef APR_SENDFILE_ENABLED
  +    flags |= APR_SENDFILE_ENABLED;
  +#endif
  +    rc = apr_file_open(&fd, data, flags, 0, r->pool);
       if (rc != APR_SUCCESS) {
           /* XXX: Log message */
           return DECLINED;
       }
   
       /* Open the headers file */
  -    rc = apr_file_open(&hfd, headers, APR_READ|APR_BINARY, 0, r->pool);
  +    flags = APR_READ|APR_BINARY|APR_BUFFERED;
  +    rc = apr_file_open(&hfd, headers, flags, 0, r->pool);
       if (rc != APR_SUCCESS) {
           /* XXX: Log message */
           return DECLINED;
  
  
  

Mime
View raw message