]> granicus.if.org Git - apache/commitdiff
Add a comment...
authorBill Stoddard <stoddard@apache.org>
Thu, 7 Mar 2002 15:16:25 +0000 (15:16 +0000)
committerBill Stoddard <stoddard@apache.org>
Thu, 7 Mar 2002 15:16:25 +0000 (15:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93768 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_mem_cache.c

index 4be47d37bcc5a0389689e292b24cbd4146e42a4e..baea72ac82201c7e3cc3449ece1a5aebe234cba3 100644 (file)
@@ -287,7 +287,16 @@ static int create_entity(cache_handle_t *h, request_rec *r,
     mobj->m_len = len;    /* Duplicates info in cache_object_t info */
 
 
-    /* Place the cache_object_t into the hash table
+    /* Place the cache_object_t into the hash table.
+     * Note: Perhaps we should wait to put the object in the
+     * hash table when the object is complete?  I add the object here to
+     * avoid multiple threads attempting to cache the same content only
+     * to discover at the very end that only one of them will suceed.
+     * Furthermore, adding the cache object to the table at the end could
+     * open up a subtle but easy to exploit DoS hole: someone could request 
+     * a very large file with multiple requests. Better to detect this here
+     * rather than after the cache object has been completely built and
+     * initialized...
      * XXX Need a way to insert into the cache w/o such coarse grained locking 
      * XXX Need to enable caching multiple cache objects (representing different
      * views of the same content) under a single search key