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 cache_storage.c
Date Thu, 12 Sep 2002 16:56:56 GMT
rederpj     2002/09/12 09:56:56

  Modified:    .        CHANGES
               modules/experimental cache_storage.c
  Log:
  mod_cache: cache_storage.c. Add the hostname and any request
  args to the key generated for caching. This provides a unique
  key for each virtual host and for each request with unique
  args. [Paul J. Reder, args code provided by Kris Verbeeck]
  
  Revision  Changes    Path
  1.923     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.922
  retrieving revision 1.923
  diff -u -r1.922 -r1.923
  --- CHANGES	12 Sep 2002 14:36:18 -0000	1.922
  +++ CHANGES	12 Sep 2002 16:56:56 -0000	1.923
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0.41
  +  *) mod_cache: cache_storage.c. Add the hostname and any request
  +     args to the key generated for caching. This provides a unique
  +     key for each virtual host and for each request with unique
  +     args. [Paul J. Reder, args code provided by Kris Verbeeck]
  +
     *) mod_cache: Do not cache responses to GET requests with query
        URLs if the origin server does not explicitly provide an
        Expires header on the response (RFC 2616 Section 13.9)
  
  
  
  1.27      +7 -2      httpd-2.0/modules/experimental/cache_storage.c
  
  Index: cache_storage.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/cache_storage.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- cache_storage.c	3 Aug 2002 22:39:42 -0000	1.26
  +++ cache_storage.c	12 Sep 2002 16:56:56 -0000	1.27
  @@ -294,8 +294,13 @@
   
   apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key ) 
   {
  -   *key = apr_pstrdup(p,r->uri);
  -   return APR_SUCCESS;
  +    if (r->hostname) {
  +        *key = apr_pstrcat(p, r->hostname, r->uri, "?", r->args, NULL);
  +    }
  +    else {
  +        *key = apr_pstrcat(p, r->uri, "?", r->args, NULL);
  +    }
  +    return APR_SUCCESS;
   }
   
   APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, create_entity, 
  
  
  

Mime
View raw message