]> granicus.if.org Git - apache/commitdiff
Fetch the filename to be cached from the file bucket rather than
authorBill Stoddard <stoddard@apache.org>
Mon, 6 May 2002 13:03:28 +0000 (13:03 +0000)
committerBill Stoddard <stoddard@apache.org>
Mon, 6 May 2002 13:03:28 +0000 (13:03 +0000)
from the request_rec.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94959 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_mem_cache.c

index 3290db6b58301d5bb3d71187ed19825a2b1d33aa..ef7004f7edc72a16b2239c697fd59a516ea32115 100644 (file)
@@ -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) {