Fix WHOIS issues

[1] Web whois should redirect to www.registry.google. whois.registry.google also points to the proxy IP, so redirecting to whois.registry.google just makes it loop. Also allow HEAD in web whois request in case that is used in monitoring.

[2] Separately, there's a bug introduced in [] where exception handling of inbound messages is moved to HttpsRelayServiceHandler. However the quota handlers are installed behind the HttpServiceServiceHandler in the channel pipeline, therefore the exception thrown in quota handlers never got processed. This results in hung connection when quota exceeded.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208651011
This commit is contained in:
jianglai 2018-08-14 08:31:50 -07:00
parent 0e64015cdf
commit 2e2898e17c
4 changed files with 20 additions and 8 deletions

View file

@ -79,10 +79,7 @@ public abstract class QuotaHandler extends ChannelInboundHandlerAdapter {
static class OverQuotaException extends Exception {
OverQuotaException(String protocol, String userId) {
super(
String.format(
"\nPROTOCOL: %s\nUSER ID: %s\nQuota exceeded, terminating connection.",
protocol, userId));
super(String.format("Quota exceeded for: PROTOCOL: %s, USER ID: %s", protocol, userId));
}
}