Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom SslContext without ALPN again for HTTP/1.1-only case #730

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

DerGuteMoritz
Copy link
Collaborator

With the introduction of HTTP/2 support, Aleph started to require a matching ALPN config to be present in custom SslContext objects. This needlessly broke existing HTTP/1.1-only uses. With this change, we now allow custom SslContext objects without ALPN config again if only HTTP/1.1 is desired (via the http-versions option). Since this still happens to be the default, existing uses should just work again.

Fixes #727


@KingMob your suggested patch almost worked as-is but was thwarted by the fact that applicationProtocolNegotiator is always present (see code comment).

Review welcome but don't merge, yet, as I also would like to add a test-http-versions-client-config test which mirrors test-http-versions-server-config for the client (as that's what #727 was originally about).

With the introduction of HTTP/2 support, Aleph started to require a matching ALPN config to be
present in custom `SslContext` objects. This needlessly broke existing HTTP/1.1-only uses. With this
change, we now allow custom `SslContext` objects without ALPN config again if only HTTP/1.1 is
desired (via the `http-versions` option). Since this still happens to be the default, existing uses
should just work again.

Fixes #727
@DerGuteMoritz DerGuteMoritz marked this pull request as draft June 13, 2024 14:28
Copy link
Collaborator

@KingMob KingMob left a comment

Choose a reason for hiding this comment

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

👍🏻

This is a mirror of `test-http-versions-server-config` to test various permutations of the
`http-versions` option in combination with `ssl-context` and `force-h2c?`.
@DerGuteMoritz DerGuteMoritz marked this pull request as ready for review June 14, 2024 12:51
@DerGuteMoritz DerGuteMoritz merged commit 06dea53 into master Jun 18, 2024
1 check passed
@DerGuteMoritz DerGuteMoritz deleted the 727/allow-http1-without-alpn-again branch June 18, 2024 12:46
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.

No ssl-context via SslContext in Aleph 0.7.0 and later
3 participants