Skip to content

Commit

Permalink
Bug fix: allow Host headers in HTTP/2 request messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Oct 18, 2024
1 parent abc2f7f commit 9024f46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public H2RequestConformance() {
HttpHeaders.KEEP_ALIVE,
HttpHeaders.PROXY_CONNECTION,
HttpHeaders.TRANSFER_ENCODING,
HttpHeaders.HOST,
HttpHeaders.UPGRADE,
HttpHeaders.TE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ void testH2RequestConformanceHostHeader() {
request.addHeader("Host", "host");

final H2RequestConformance interceptor = new H2RequestConformance();
Assertions.assertThrows(HttpException.class, () -> interceptor.process(request, null, context),
"Header 'Host: host' is illegal for HTTP/2 messages");
Assertions.assertDoesNotThrow(() -> interceptor.process(request, null, context),
"Header 'Host: host' is permissible for HTTP/2 messages");
}

@Test
Expand Down

0 comments on commit 9024f46

Please sign in to comment.