diff options
author | Fergus Dall <fergus@beware.dropbear.id.au> | 2016-01-13 18:05:35 +1030 |
---|---|---|
committer | Fergus Dall <fergus@beware.dropbear.id.au> | 2016-01-13 18:05:52 +1030 |
commit | d748c193e16bc13b6d00de168e5fff0a372620bc (patch) | |
tree | 23b77dfddc0f6734d3d7bf4db84f2b8ef75b302c /src/or/routerlist.c | |
parent | 91077d3aca2ea027816f4ea733bb8193dd60a2f2 (diff) | |
download | tor-d748c193e16bc13b6d00de168e5fff0a372620bc.tar.gz tor-d748c193e16bc13b6d00de168e5fff0a372620bc.zip |
Include square brackets and port number in calcs for max_dl_per_request
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 8edab2c634..139a2924fc 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4440,15 +4440,15 @@ static int max_dl_per_request(const or_options_t *options, int purpose) { /* Since squid does not like URLs >= 4096 bytes we limit it to 96. - * 4096 - strlen(http://ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff - * /tor/server/d/.z) == 4034 - * 4034/41 (40 for the hash and 1 for the + that separates them) => 98 + * 4096 - strlen(http://[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + * /tor/server/d/.z) == 4026 + * 4026/41 (40 for the hash and 1 for the + that separates them) => 98 * So use 96 because it's a nice number. * * For microdescriptors, the calculation is - * 4096 - strlen(http://ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff - * /tor/micro/d/.z) == 4035 - * 4035/44 (43 for the hash and 1 for the - that separates them) => 91 + * 4096 - strlen(http://[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + * /tor/micro/d/.z) == 4027 + * 4027/44 (43 for the hash and 1 for the - that separates them) => 91 * So use 90 because it's a nice number. */ int max = 96; |