mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
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
This commit is contained in:
parent
0fadf0aad6
commit
1800fbe486
1 changed files with 8 additions and 6 deletions
|
@ -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);
|
plausible = body_is_plausible(body, body_len, conn->purpose);
|
||||||
if (compression || !plausible) {
|
if (compression || !plausible) {
|
||||||
char *new_body = NULL;
|
char *new_body = NULL;
|
||||||
|
@ -950,12 +958,6 @@ connection_dir_client_reached_eof(connection_t *conn)
|
||||||
/* fetch/process the directory to cache it. */
|
/* fetch/process the directory to cache it. */
|
||||||
info(LD_DIR,"Received directory (size %d) from server '%s:%d'",
|
info(LD_DIR,"Received directory (size %d) from server '%s:%d'",
|
||||||
(int)body_len, conn->address, conn->port);
|
(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) {
|
if (status_code != 200) {
|
||||||
warn(LD_DIR,"Received http status code %d (\"%s\") from server "
|
warn(LD_DIR,"Received http status code %d (\"%s\") from server "
|
||||||
"'%s:%d'. I'll try again soon.",
|
"'%s:%d'. I'll try again soon.",
|
||||||
|
|
Loading…
Add table
Reference in a new issue