Skip to content

With Tomcat, enable HTTP/2 by default #9964

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

Closed
wants to merge 2 commits into from

Conversation

candrews
Copy link
Contributor

@candrews candrews commented Aug 7, 2017

When using embedded Tomcat, enable HTTP/2 for connectors by default.

Tomcat's HTTP/2 support depends on tomcat-native/APR; if that's not available, Tomcat simply logs a message and continues on without HTTP/2 support (in other words, nothing is broken).

Since this change enables APR (if it's available), it also improves performance in general (if APR is available) by using the OpenSSL engine instead of JSSE, fixing #7376

Adds AprLifecycleListener to the Tomcat listeners.

Fixes spring-projects#7376
Note that, until Java 9 arrives with ALPN support (JEP-244), tomcat-native/APR must be available in order for Tomcat to enable HTTP/2 (if it is not available, an error is logged but everything otherwise still works).
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2017
@candrews
Copy link
Contributor Author

candrews commented Aug 7, 2017

The tomcat-native / libtcnative-1 package isn't available on Travis CI right now so we can't add this package to .travis.yml to facilitate testing of this functionality. I've requested it be added at travis-ci/apt-package-safelist#4215

@wilkinsona
Copy link
Member

Thanks for the PR. Generally speaking, when all three containers have the same functionality, we like to support it consistently across all three. In other words, it's unlikely that we'll merge this while it's Tomcat-specific.

A different approach, that covers all three containers but doesn't enabled HTTP/2 by default, is being proposed in #9981.

@bclozel bclozel self-assigned this Sep 29, 2017
@wilkinsona wilkinsona added priority: normal type: enhancement A general enhancement for: merge-with-amendments Needs some changes when we merge and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 29, 2017
@wilkinsona wilkinsona added this to the 2.0.0.M6 milestone Sep 29, 2017
@bclozel bclozel closed this in 5f57578 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: merge-with-amendments Needs some changes when we merge type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants