Add checks against empty headers.host and a test.