summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-06-22 12:34:32 -0400
committerNick Mathewson <nickm@torproject.org>2009-06-22 12:34:32 -0400
commit262455527a82d1a9d482e3df32651700b2ba8c6e (patch)
tree21ac6b43113fc9797a339a0050e5933096db3eb7
parente6a1e7001b6546832661ff3608ea3358f7615bd7 (diff)
downloadtor-262455527a82d1a9d482e3df32651700b2ba8c6e.tar.gz
tor-262455527a82d1a9d482e3df32651700b2ba8c6e.zip
Serve DirPortFrontPage even if the write bucket is low.
arma's rationale: "I think this is a bug, since people intentionally set DirPortFrontPage, so they really do want their relay to serve that page when it's asked for. Having it appear only sometimes (or roughly never in Sebastian's case) makes it way less useful." Fixes bug 1013; bugfix on 0.2.1.8-alpha.
-rw-r--r--ChangeLog6
-rw-r--r--src/or/directory.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 436116bd7f..f7da7c4cba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Changes in version 0.2.1.17-?? - 2009-??-??
+ o Minor bugfixes:
+ - Serve the DirPortFrontPage page even when we have been approaching
+ our quotas recently. Fixes bug 1013; bugfix on 0.2.1.8-alpha.
+
+
Changes in version 0.2.1.16-rc - 2009-06-20
o Security fixes:
- Fix an edge case where a malicious exit relay could convince a
diff --git a/src/or/directory.c b/src/or/directory.c
index d783772eac..4ab2633022 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2428,13 +2428,9 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
dlen = strlen(frontpage);
/* Let's return a disclaimer page (users shouldn't use V1 anymore,
and caches don't fetch '/', so this is safe). */
- if (global_write_bucket_low(TO_CONN(conn), dlen, 1)) {
- log_info(LD_DIRSERV,
- "Client asked for DirPortFrontPage content, but we've been "
- "writing too many bytes lately. Sending 503 Dir busy.");
- write_http_status_line(conn, 503, "Directory busy, try again later");
- goto done;
- }
+
+ /* [We don't check for write_bucket_low here, since we want to serve
+ * this page no matter what.] */
note_request(url, dlen);
write_http_response_header_impl(conn, dlen, "text/html", "identity",
NULL, DIRPORTFRONTPAGE_CACHE_LIFETIME);