Skip to content

docs(client): note ALPN/connector decides HTTP/1 vs HTTP/2 - #4200

Open
SatvikMishra08 wants to merge 1 commit into
hyperium:masterfrom
SatvikMishra08:docs/client-alpn-http-version-2717
Open

SatvikMishra08 wants to merge 1 commit into
hyperium:masterfrom
SatvikMishra08:docs/client-alpn-http-version-2717

Conversation

@SatvikMishra08

Copy link
Copy Markdown

Fixes #2717.

Summary

  • Document in client::conn that ALPN / the connector chooses HTTP/1 vs HTTP/2 and that choice is final for the connection.
  • Clarify that Request / Version does not select the protocol at this layer (same rule for higher-level clients such as hyper-util's legacy Client).
  • Short cross-link from client module docs.

Docs only; no behavior change.

Validation

  • git apply clean on master @ e89d0d93d956
  • git diff --check
  • cargo doc -p hyper --no-deps --features full (optional)

AI disclosure

  1. AI assisted with reading Document that the Connector can determine HTTP version #2717 / maintainer comments and drafting this narrow rustdoc wording.
  2. I reviewed the change and believe it is relevant and correct.

Clarify that after TLS ALPN (or equivalent connector metadata), the
negotiated protocol is final: call http1::handshake or http2::handshake
accordingly. Request::version does not select the connection protocol.

Fixes hyperium#2717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that the Connector can determine HTTP version

1 participant