Skip to content

RFC 7639 ALPN - #731

Open
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:rfc7639
Open

RFC 7639 ALPN #731
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:rfc7639

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

Add ConnectAlpnProvider and inject ALPN header in ConnectExec/AsyncConnectExec. Provide builder hooks for fixed list or provider-driven values.

@ok2c

ok2c commented Nov 29, 2025

Copy link
Copy Markdown
Member

@arturobernalg Could you please rebase this change-set?

@arturobernalg
arturobernalgforce-pushed the rfc7639 branch 2 times, most recently from cc58cd1 to 208b565CompareDecember 20, 2025 12:20
@arturobernalg

Copy link
Copy Markdown
MemberAuthor

@arturobernalg Could you please rebase this change-set?

@ok2c done.

@arturobernalg
arturobernalgforce-pushed the rfc7639 branch 2 times, most recently from a178fe7 to e343841CompareJanuary 12, 2026 09:57
@ok2c

ok2c commented May 31, 2026

Copy link
Copy Markdown
Member

@arturobernalg This change can still make it into 5.7 if you are willing to invest time into it.

@arturobernalg
arturobernalgforce-pushed the rfc7639 branch 2 times, most recently from 36079e1 to 46a533eCompareJune 19, 2026 11:57
@arturobernalg
arturobernalg requested a review from ok2cJune 19, 2026 12:12
@arturobernalg

Copy link
Copy Markdown
MemberAuthor

@arturobernalg This change can still make it into 5.7 if you are willing to invest time into it.

@ok2c please do another pass

@arturobernalg
arturobernalg requested a review from ok2cJuly 11, 2026 17:57
@arturobernalg
arturobernalgforce-pushed the rfc7639 branch 2 times, most recently from 05a370f to 0af7b0fCompareJuly 11, 2026 18:07

@ok2cok2c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Much, much better! However, we need to figure out a better of way of passing the actual TLS policy to the interceptors. I would try to solve it by adding HttpVersionPolicy as an attribute to HttpClientContext

Encode protocol IDs with core's PercentCodec.HTTP_TOKEN (canonical RFC 7230 tchar form, uppercase hex) and decode strictly, rejecting malformed percent-encoding with ProtocolException.
The advertised protocol set is derived from the target's HttpVersionPolicy. The connection manager resolves the effective TlsConfig and publishes the policy on HttpClientContext before the connection is established; ConnectExec and AsyncConnectExec read it back and, on secure CONNECT tunnels, advertise the same protocols the tunnel's TLS layer will offer, so the header cannot diverge from the protocol negotiated inside the tunnel. Interceptors fall back to NEGOTIATE when no policy is present on the context.
Sign up for freeto 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.

2 participants

@arturobernalg@ok2c