summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-02-03 12:08:31 +0000
committerRoger Dingledine <arma@torproject.org>2006-02-03 12:08:31 +0000
commit1800fbe4862e5e810487bf27b0c8ef18c8ee4433 (patch)
tree127a109e029ec0fad1142b6095bf3f3b8189b9ae /src/or/directory.c
parent0fadf0aad6fc59a51418489a0171840d9ca162e6 (diff)
downloadtor-1800fbe4862e5e810487bf27b0c8ef18c8ee4433.tar.gz
tor-1800fbe4862e5e810487bf27b0c8ef18c8ee4433.zip
don't warn when we receive a 503 from a dirserver/cache -- this
will pave the way for them being able to tell us to screw off if they're busy. svn:r5898
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 9be6351356..8210108a92 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -891,6 +891,14 @@ connection_dir_client_reached_eof(connection_t *conn)
}
}
+ if (status_code == 503) {
+ info(LD_DIR,"Received http status code %d (\"%s\") from server "
+ "'%s:%d'. I'll try again soon.",
+ status_code, reason, conn->address, conn->port);
+ tor_free(body); tor_free(headers); tor_free(reason);
+ return -1;
+ }
+
plausible = body_is_plausible(body, body_len, conn->purpose);
if (compression || !plausible) {
char *new_body = NULL;
@@ -950,12 +958,6 @@ connection_dir_client_reached_eof(connection_t *conn)
/* fetch/process the directory to cache it. */
info(LD_DIR,"Received directory (size %d) from server '%s:%d'",
(int)body_len, conn->address, conn->port);
- if (status_code == 503 || body_len == 0) {
- info(LD_DIR,"Empty directory; status %d (\"%s\") Ignoring.",
- status_code, reason);
- tor_free(body); tor_free(headers); tor_free(reason);
- return -1;
- }
if (status_code != 200) {
warn(LD_DIR,"Received http status code %d (\"%s\") from server "
"'%s:%d'. I'll try again soon.",