[or-cvs] r19189: {tor} Directory authorities should never send a 503 "busy" respons (in tor/trunk: . src/or)

arma at seul.org arma at seul.org
Tue Mar 31 01:29:08 UTC 2009


Author: arma
Date: 2009-03-30 21:29:07 -0400 (Mon, 30 Mar 2009)
New Revision: 19189

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/directory.c
Log:
Directory authorities should never send a 503 "busy" response to
requests for votes or keys. Bugfix on 0.2.0.8-alpha; exposed by
bug 959.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-03-30 16:35:32 UTC (rev 19188)
+++ tor/trunk/ChangeLog	2009-03-31 01:29:07 UTC (rev 19189)
@@ -1,4 +1,4 @@
-Changes in version 0.2.1.14-??? - 2009-03-??
+Changes in version 0.2.1.14-??? - 2009-04-??
   o Minor bugfixes:
     - Avoid trying to print raw memory to the logs when we decide to
       give up on downloading a given relay descriptor. Bugfix on
@@ -16,6 +16,9 @@
       duplicating a string at the end of a page.  This bug was
       harmless for now, but could have meant crashes later. Fix by
       lark.  Bugfix on 0.2.1.1-alpha.
+    - Directory authorities should never send a 503 "busy" response to
+      requests for votes or keys. Bugfix on 0.2.0.8-alpha; exposed by
+      bug 959.
 
   o Minor features (controller):
     - Try harder to look up nicknames for routers on a circuit when

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2009-03-30 16:35:32 UTC (rev 19188)
+++ tor/trunk/src/or/directory.c	2009-03-31 01:29:07 UTC (rev 19189)
@@ -2604,7 +2604,7 @@
       !strcmpstart(url,"/tor/status-vote/next/")) {
     /* XXXX If-modified-since is only implemented for the current
      * consensus: that's probably fine, since it's the only vote document
-     * people fetch much.*/
+     * people fetch much. */
     int current;
     ssize_t body_len = 0;
     ssize_t estimated_len = 0;
@@ -2670,7 +2670,7 @@
         }
       });
 
-    if (global_write_bucket_low(TO_CONN(conn), estimated_len, 1)) {
+    if (global_write_bucket_low(TO_CONN(conn), estimated_len, 2)) {
       write_http_status_line(conn, 503, "Directory busy, try again later.");
       goto vote_done;
     }
@@ -2827,7 +2827,7 @@
     SMARTLIST_FOREACH(certs, authority_cert_t *, c,
                       len += c->cache_info.signed_descriptor_len);
 
-    if (global_write_bucket_low(TO_CONN(conn), compressed?len/2:len, 1)) {
+    if (global_write_bucket_low(TO_CONN(conn), compressed?len/2:len, 2)) {
       write_http_status_line(conn, 503, "Directory busy, try again later.");
       goto keys_done;
     }



More information about the tor-commits mailing list