Support for h2c (HTTP/2 over cleartext) #11116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
提供对 h2c (HTTP/2 over cleartext) 的支持
Provides support for h2c (HTTP/2 over cleartext).
虽然目前主流的浏览器大都仅支持 h2 (HTTP/2 over TLS) 方案, 但是如果内核支持
h2c
, 那么也能提高Nginx
等 Web 服务器反向代理的效率Although most mainstream browsers only support h2 (HTTP/2 over TLS), if the kernel supports
h2c
, it can also improve the efficiency of reverse proxies for web servers such asNginx
.兼容
HTTP/1.1
Compatible with
HTTP/1.1
REF: gin-gonic/gin#1398
已测试 | TESTED