perf(core): look up the authority only for an HTTP/1.0 request in the missing Host check (#8443)

This commit is contained in:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-11-15 08:34:23 -04:00
1 parent e9f842765d
commit f5e08d5e9c
2 files changed
+20 -2

No files matched your search

@@ -64,6 +64,21 @@ class MissingHostHeaderIntegrationTest {
}
}
@Test
void http10WithInvalidHostHeaderServesHealth() throws Exception {
String response = rawRequest("GET /_floci/health HTTP/1.0\r\nHost: a b\r\n\r\n");
assertThat(response, startsWith("HTTP/1.0 200 OK"));
}
@Test
void http11WithInvalidHostHeaderIsRejected() throws Exception {
String response = rawRequest(
"GET /_floci/health HTTP/1.1\r\nHost: a b\r\nConnection: close\r\n\r\n");
assertThat(response, startsWith("HTTP/1.1 400 Bad Request"));
}
@Test
void http11WithoutHostHeaderIsRejected() throws Exception {
String response = rawRequest("GET /_floci/health HTTP/1.1\r\nConnection: close\r\n\r\n");