You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2001/08/24 19:21:39 UTC
cvs commit: httpd-2.0/modules/experimental cache_storage.c mod_cache.c
stoddard 01/08/24 10:21:39
Modified: modules/experimental cache_storage.c mod_cache.c
Log:
Fix seg fault when requesting a page that returns a 'don't cache' header.
Revision Changes Path
1.4 +5 -8 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cache_storage.c 2001/08/24 17:01:21 1.3
+++ cache_storage.c 2001/08/24 17:21:39 1.4
@@ -80,8 +80,9 @@
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 @@
* 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;
}
1.11 +4 -1 httpd-2.0/modules/experimental/mod_cache.c
Index: mod_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mod_cache.c 2001/08/24 16:33:10 1.10
+++ mod_cache.c 2001/08/24 17:21:39 1.11
@@ -480,7 +480,10 @@
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 */