]> granicus.if.org Git - apache/commitdiff
Fix seg fault when requesting a page that returns a 'don't cache' header.
authorBill Stoddard <stoddard@apache.org>
Fri, 24 Aug 2001 17:21:39 +0000 (17:21 +0000)
committerBill Stoddard <stoddard@apache.org>
Fri, 24 Aug 2001 17:21:39 +0000 (17:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90642 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/cache_storage.c
modules/experimental/mod_cache.c

index 2f4580324a1d2c9d5a63f975b4c46c0da234e63b..8dec2c737c69e4f1105c1e2b9f2c36179a31b952 100644 (file)
@@ -80,8 +80,9 @@ int cache_remove_url(request_rec *r, const char *types, char *url)
     const char *type;
 
     /* for each specified cache type, delete the URL */
-    while ((type = ap_cache_tokstr(r->pool, next, &next))) {
-       cache_run_remove_url(type, url);
+    while(next) {
+        type = ap_cache_tokstr(r->pool, next, &next);
+        cache_run_remove_url(type, url);
     }
     return OK;
 }
@@ -132,14 +133,10 @@ int cache_create_entity(request_rec *r, const char *types, char *url, apr_size_t
  * The specific entity referenced by the cache_handle is removed
  * from the cache, and the cache_handle is closed.
  */
+/* XXX Don't think we need to pass in request_rec or types ... */
 int cache_remove_entity(request_rec *r, const char *types, cache_handle *h)
 {
-    const char *next = types;
-    const char *type;
-
-    while (next) {
-        type = ap_cache_tokstr(r->pool, next, &next);
-    }
+    h->remove_entity(h);
     return 1;
 }
 
index 1fc02cbf0921dbd3f685cba151291cf20ce23603..406cb69d1769922142e47d629763548306c27510 100644 (file)
@@ -480,7 +480,10 @@ int ap_cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
         ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server,
                  "cache: response is not cachable");
 
-        /* remove this object from the cache */
+        /* remove this object from the cache 
+         * BillS Asks.. Why do we need to make this call to remove_url?
+         * leave it in for now..
+         */
         cache_remove_url(r, cache->types, url);
 
         /* remove this filter from the chain */