[or-cvs] r10605: point out a bug in our If-Modified-Since handling in 0.2.0.2 (tor/trunk/src/or)

arma at seul.org arma at seul.org
Fri Jun 15 03:14:02 UTC 2007


Author: arma
Date: 2007-06-14 23:14:02 -0400 (Thu, 14 Jun 2007)
New Revision: 10605

Modified:
   tor/trunk/src/or/dirserv.c
Log:
point out a bug in our If-Modified-Since handling in 0.2.0.2-alpha.


Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2007-06-15 02:12:15 UTC (rev 10604)
+++ tor/trunk/src/or/dirserv.c	2007-06-15 03:14:02 UTC (rev 10605)
@@ -2552,6 +2552,12 @@
       d = digestmap_get(cached_v2_networkstatus, digest);
     if (d && d->published > cutoff)
       return 0;
+    /* XXX020 The above is causing my dir cache to send "304 Not modified"
+     * to clients that never specified an If-Modified-Since header. That's
+     * because d isn't defined for the networkstatus the client is asking
+     * for, so we end up returning 1. Perhaps the right fix above is
+     * "if (!d || d->published >= cutoff)"? -RD
+     */
   });
 
   return 1;



More information about the tor-commits mailing list