--- ../dist/modules/cache/mod_cache.c 2005-11-10 16:20:05.000000000 +0100 +++ ../dist/modules/cache/mod_cache.c 2006-04-21 15:54:05.000000000 +0200 @@ -245,6 +245,7 @@ { request_rec *r = f->r; cache_request_rec *cache; + char *path; cache = (cache_request_rec *) ap_get_module_config(r->request_config, &cache_module); @@ -266,6 +267,18 @@ * restore the status into it's handle. */ r->status = cache->handle->cache_obj->info.status; + if(!r->filename) { + /* Restore filename, used by %f in LogFormat config */ + /* FIXME: This should really be saved with the headers when + caching, now we just bodge together something that might be right */ + path = r->uri; + while (*path == '/') { + ++path; + } + apr_filepath_merge(&r->filename, ap_document_root(r), path, + APR_FILEPATH_TRUENAME | APR_FILEPATH_SECUREROOT, r->pool); + } + /* recall_headers() was called in cache_select() */ cache->provider->recall_body(cache->handle, r->pool, bb);