简体   繁体   English

Tomcat对HTTP / 2.0的支持?

[英]Tomcat support for HTTP/2.0?

Does anyone know what is the lowest version of Tomcat that supports HTTP/2.0? 有谁知道支持HTTP / 2.0的Tomcat的最低版本是什么? I've been looking everywhere on their site and I cannot find any details regarding this. 我一直在他们的网站上的任何地方寻找,我找不到任何有关这方面的细节。

I'm the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2. 我是Jetty中的HTTP / 2实现者,我注意到实现HTTP / 2的其他项目。

Tomcat's Mark Thomas has outlined support for HTTP/2 for Tomcat 9 . Tomcat的Mark Thomas已经为Tomcat 9概述了对HTTP / 2的支持

Update Jan 2017 : Tomcat 8.5 supports HTTP/2 see @joe-aldrich answer https://stackoverflow.com/a/37889873/2027465 2017年1月更新 :Tomcat 8.5支持HTTP / 2,请参阅@ joe-aldrich回答https://stackoverflow.com/a/37889873/2027465

Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN support in the JDK (which also I am involved in), and that ALPN support in the JDK is scheduled for JDK 9, it is probably going to be a long time before all that materializes. 考虑到Servlet 4.0将作为目标HTTP / 2支持,并且HTTP / 2支持需要JDK中的ALPN支持(我也参与其中),并且JDK中的ALPN支持计划用于JDK 9,所有实现之前可能需要很长时间。

However, be aware that other Servlet Containers already provide HTTP/2 support. 但是,请注意其他Servlet容器已提供HTTP / 2支持。

Jetty 9.3.0 has full, robust, support for HTTP/2 , client and server. Jetty 9.3.0具有完整,强大的HTTP / 2 ,客户端和服务器支持。 We have been running HTTP/2 on our own website for many months now, and we consider HTTP/2 support production ready. 我们已经在我们自己的网站上运行HTTP / 2了好几个月了,我们认为HTTP / 2支持生产准备就绪。 Jetty's HTTP/2 Push APIs are being considered for inclusion in Servlet 4.0. Jetty的HTTP / 2推送API正被考虑包含在Servlet 4.0中。 HTTP/2 Push is already available to applications deployed to Jetty in a transparent way (via a Servlet Filter). HTTP / 2 Push已经以透明方式(通过Servlet过滤器)部署到Jetty的应用程序可用。

Undertow also has an implementation for HTTP/2. Undertow还有一个HTTP / 2实现。

Netty also has one, but it's not based on the Servlet APIs. Netty也有一个,但它不是基于Servlet API。

Tomcat 8.5已发布,具有从Tomcat 9反向移植的功能,并包含HTTP / 2支持。

The latest version of Tomcat ( version 9 ) fully supports HTTP/2. 最新版本的Tomcat( 版本9 )完全支持HTTP / 2。 However, as all major browsers only implement HTTP/2 over TLS you will need to configure Tomcat to allow this. 但是,由于所有主流浏览器仅通过TLS实现HTTP / 2,因此您需要配置Tomcat以允许此操作。 This article explains TLS configuration in Tomcat , but here's the summary. 本文解释了Tomcat中的TLS配置 ,但这里是摘要。

Open the conf/server.xml file and make the following configuration changes. 打开conf/server.xml文件并进行以下配置更改。

<Connector port="8443"
  protocol="org.apache.coyote.http11.Http11AprProtocol"
  maxThreads="150" SSLEnabled="true">
    <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
    <SSLHostConfig honorCipherOrder="false">
        <Certificate certificateKeyFile="conf/ca.key"
          certificateFile="conf/ca.crt"/>
    </SSLHostConfig>
</Connector>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM