google-nomulus/javatests/google/registry/proxy
jianglai 8664101687 Make web WHOIS more resilient to malformed requests
We are seeing some web WHOIS HTTP(S) requests made to our endpoints without the Host header specified. This is an error according to the HTTP/1.1 spec. However we do not want to spam our logs with errors that are outside of our control. Do not throw and return a 400 response instead.

Also re-worked the logic a bit to only return HSTS headers if we send a redirect response, not any other error responses. The tests are re-arrange to correspond with the logical flow in the code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207143230
2018-08-10 13:46:48 -04:00
..
handler Make web WHOIS more resilient to malformed requests 2018-08-10 13:46:48 -04:00
metric Fix proxy metrics instrumentation bug 2018-05-30 12:18:54 -04:00
quota Clean up some code quality issues in GCP proxy 2018-03-19 18:44:12 -04:00
testdata Open source GCP proxy 2017-11-21 19:19:03 -05:00
BUILD Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
CertificateModuleTest.java Use self signed certificate when running the proxy locally 2018-04-10 16:36:56 -04:00
EppProtocolModuleTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
GcpJsonFormatterTest.java Clean up some code quality issues in GCP proxy 2018-03-19 18:44:12 -04:00
HealthCheckProtocolModuleTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
HttpsRelayProtocolModuleTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
ProtocolModuleTest.java Add tests for web whois protocols module 2018-08-10 13:46:48 -04:00
ProxyModuleTest.java Add web WHOIS redirect support 2018-08-10 13:46:48 -04:00
TestUtils.java Add tests for web whois protocols module 2018-08-10 13:46:48 -04:00
WebWhoisProtocolsModuleTest.java Add tests for web whois protocols module 2018-08-10 13:46:48 -04:00
WhoisProtocolModuleTest.java Open source GCP proxy 2017-11-21 19:19:03 -05:00