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

@ -62,7 +62,7 @@ public class WebWhoisRedirectHandlerTest {
// HTTP redirect tests.
@Test
public void testSuccess_http_notGet() {
public void testSuccess_http_methodNotAllowed() {
setupChannel(false);
request = makeHttpPostRequest("", TARGET_HOST, "/");
// No inbound message passed to the next handler.
@ -156,7 +156,7 @@ public class WebWhoisRedirectHandlerTest {
// HTTPS redirect tests.
@Test
public void testSuccess_https_notGet() {
public void testSuccess_https_methodNotAllowed() {
setupChannel(true);
request = makeHttpPostRequest("", TARGET_HOST, "/");
// No inbound message passed to the next handler.