Skip to content

Commit 7d9a580

Browse files
authored
refactor(http1): change HTTP2->1.1 warning to debug (#2354)
We use hyper in a proxy-like way where an incoming HTTP/2 request is proxied to a HTTP/1 backend and it was reported that the protocol coercion warnings were a limiting factor in the total throughput of the system. While it can be worked around by explicitly setting the request version to HTTP_11, it seems likely other people also hit this performance snag. That's why this commit changes them from warnings to debug messages.
1 parent b4e2433 commit 7d9a580

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/proto/h1/role.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl Http1Transaction for Server {
333333
Version::HTTP_10 => extend(dst, b"HTTP/1.0 "),
334334
Version::HTTP_11 => extend(dst, b"HTTP/1.1 "),
335335
Version::HTTP_2 => {
336-
warn!("response with HTTP2 version coerced to HTTP/1.1");
336+
debug!("response with HTTP2 version coerced to HTTP/1.1");
337337
extend(dst, b"HTTP/1.1 ");
338338
}
339339
other => panic!("unexpected response version: {:?}", other),
@@ -757,7 +757,7 @@ impl Http1Transaction for Client {
757757
Version::HTTP_10 => extend(dst, b"HTTP/1.0"),
758758
Version::HTTP_11 => extend(dst, b"HTTP/1.1"),
759759
Version::HTTP_2 => {
760-
warn!("request with HTTP2 version coerced to HTTP/1.1");
760+
debug!("request with HTTP2 version coerced to HTTP/1.1");
761761
extend(dst, b"HTTP/1.1");
762762
}
763763
other => panic!("unexpected request version: {:?}", other),

0 commit comments

Comments
 (0)