Commit e1831c9d authored by Bill Stoddard's avatar Bill Stoddard
Browse files

Fix seg fault when requesting a page that returns a 'don't cache' header.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90642 13f79535-47bb-0310-9956-ffa450edef68
parent 6d8adf82
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ 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))) {
    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;
}

+4 −1
Original line number Diff line number Diff line
@@ -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 */