From: Bill Stoddard Date: Mon, 6 May 2002 13:03:28 +0000 (+0000) Subject: Fetch the filename to be cached from the file bucket rather than X-Git-Tag: 2.0.37~489 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=136d244bcec250de15784e44b9817d97f8e51638;p=apache Fetch the filename to be cached from the file bucket rather than from the request_rec. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94959 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_mem_cache.c b/modules/experimental/mod_mem_cache.c index 3290db6b58..ef7004f7ed 100644 --- a/modules/experimental/mod_mem_cache.c +++ b/modules/experimental/mod_mem_cache.c @@ -759,10 +759,10 @@ static apr_status_t write_body(cache_handle_t *h, request_rec *r, apr_bucket_bri } if (fd == 1 && !other && eos) { apr_file_t *tmpfile; - /* Open a new XTHREAD handle to the file - * XXX: Need to fetch the filename from the file bucket... - */ - rv = apr_file_open(&tmpfile, r->filename, + char *name; + /* Open a new XTHREAD handle to the file */ + apr_file_name_get(&name, file); + rv = apr_file_open(&tmpfile, name, APR_READ | APR_BINARY | APR_XTHREAD | APR_FILE_NOCLEANUP, APR_OS_DEFAULT, r->pool); if (rv != APR_SUCCESS) {