Bug 39351 - Continue early if bucket length is zero
Summary: Continue early if bucket length is zero
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache_disk / mod_disk_cache (show other bugs)
Version: 2.5-HEAD
Hardware: Other other
: P2 trivial (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Blocks:
 
Reported: 2006-04-19 14:39 UTC by Davi Arnaut
Modified: 2013-02-02 07:22 UTC (History)
0 users



Attachments
Continue early if bucket length is zero (480 bytes, patch)
2006-04-19 14:40 UTC, Davi Arnaut
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Davi Arnaut 2006-04-19 14:39:36 UTC
Continue early if bucket length is zero, skipping a few instructions in the code
path.
Comment 1 Davi Arnaut 2006-04-19 14:40:12 UTC
Created attachment 18134 [details]
Continue early if bucket length is zero
Comment 2 Christophe JAILLET 2013-02-02 07:22:17 UTC
This is actually in trunk, in mod_cache_disk which replaced mod_disk_cache in 2.4.x.

This was done in r1002832.


@@ -1131,6 +1122,33 @@
             return rv;
         }
+        /* don't write empty buckets to the cache */
+        if (!length) {
+            continue;
+        }


So closing this report.