log(WARNING, "[%s] Failed to parse URL '%s'", url.c_str(), url.c_str());
break;
}
+
+ // Remove the brackets around IPv6 address literals.
+ // TODO: See if we can join this with the code in parse_ip_address(),
+ // or maybe even more it into parse_url().
+ if (!host.empty() && host[0] == '[' && host[host.size() - 1] == ']') {
+ host = host.substr(1, host.size() - 2);
+ }
}
sock = lookup_and_connect(host, port);
has_metacube_header = false;
continue;
}
- if (size > 1048576) {
- log(WARNING, "[%s] Metacube block of %d bytes (flags=%x); corrupted header?",
+ if (size > 10485760) {
+ log(WARNING, "[%s] Metacube block of %d bytes (flags=%x); corrupted header??",
url.c_str(), size, flags);
}