我可以在没有ALPN支持的情况下实现http/2服务器吗? [英] Can I implements http/2 server without ALPN support?

查看:174
本文介绍了我可以在没有ALPN支持的情况下实现http/2服务器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过这种方式,客户端可以在没有ALPN的情况下连接服务器,并使用http/2默认值.

In this way, the client can connect the server without ALPN and use http/2 default.

有可能吗?

推荐答案

是可以的,但是条件很严格.

Yes it is possible, but the conditions are strict.

到目前为止,浏览器尚未实现HTTP/2的明文通信,因此,如果您使用浏览器,则问题的答案是否定的:如果要使浏览器成为浏览器,则必须部署具有ALPN支持的服务器.能够连接.

Browsers, as of now, do not implement clear-text communication for HTTP/2, so if you use a browser the answer to your question is no: you have to deploy your server with ALPN support if you want browsers to be able to connect.

另一方面,其他客户端(例如Java客户端)也可以使用明文HTTP/2连接到服务器,因此对于这些类型的客户端,您的问题的答案是肯定的:您可以部署HTTP/2台不支持ALPN的服务器.

On the other hand, other clients such as Java clients may be able to connect to a server using clear-text HTTP/2, so for those type of clients the answer to your question is yes: you can deploy a HTTP/2 server without ALPN support.

Jetty项目 [免责声明,我是提交者]实现了支持这两种情况的Web服务器和servlet容器:您可以为TLS(SSL)HTTP/2通信启用ALPN,以便浏览器能够连接,也可以将明文HTTP/2通信启用为 Jetty HTTP/2文档.

The Jetty Project [disclaimer, I am a committer] implements a web server and servlet container that support both scenarios: you can enable ALPN for TLS (SSL) HTTP/2 communication so that browsers will be able to connect, and you can also enable clear-text HTTP/2 communication as explained here. See also the Jetty HTTP/2 documentation.

这篇关于我可以在没有ALPN支持的情况下实现http/2服务器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆