style(http2): use an enum instead of bool in strip_connection_headers() - #4094
Merged
Conversation
seanmonstar
force-pushed
the
sean/kwumkmtlmvuu
branch
3 times, most recently
from
June 1, 2026 18:08
c1e5d9c to
8ef9889
Compare
seanmonstar
force-pushed
the
sean/kwumkmtlmvuu
branch
from
June 1, 2026 18:13
8ef9889 to
25234c5
Compare
arrimorris
pushed a commit
to arrimorris/hyper
that referenced
this pull request
Aug 19, 2026
`strip_connection_headers` gated the request and response halves of the `TE` check together under `cfg(feature = "client")`. In a server-only build the `else` branch disappeared along with the `if`, so responses never had `TE` removed at all — expanding the crate with `--no-default-features --features server,http2` leaves the whole check as `let _ = kind;`. Each half is now gated on its own feature. This predates HTTP/3 — it arrived with hyperium#4094 and affects the HTTP/2 server the same way; hyper's `--lib` tests do not compile in a server-only build, so nothing ran the path. Unit tests now cover both message kinds, each gated so it runs wherever its half is compiled in. Also documents two things the HTTP/3 modules left implicit: that ALPN `h3` is the QUIC layer's to configure and hyper can neither see nor set it, and that `max_late_requests` widens which late streams are accepted rather than holding an idle connection open — HTTP/2 gets that from its PING-acknowledged two-stage GOAWAY, and h3 exposes no counterpart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found this
is_request: boolparameter which I hate. What doesstrip_headers(headers, true)mean? Hard to know with just a boolean. Make it an enum.