-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Need backward compatibility to use http1 on Http2Server #18554
Comments
Any update on this request? |
cc @nodejs/http2 |
This is not yet possible with plain text http2 because the fallback mechanism depends entirely on the use of the ALPN tls extension. Working on this is not currently in plan for me but I'm happy to review PRs if anyone wants to tackle it |
I'd written some unit tests for NodeJS HTTP/2 in the past, and have an idea about how core.js works. |
ALPN is already supported, it is the mechanism to support both HTTP/1.1 and HTTP/2 over the secure channel. Basically ALPN is used to kickstart the connection. Upgrading from a plain text HTTP1 to HTTP2 would mean to use a similar flow to what is used for websockets (check out https://www.npmjs.com/package/ws) to upgrade the socket. |
At this point in time, there's really no plan to implement this in core. The current implementation should not preclude anyone from providing an implementation that uses a similar http/1 upgrade path as is used by bootstrapping websockets. |
Details:
Http2SecureServer
node/lib/internal/http2/core.js
Lines 2456 to 2457 in 6d84ece
allowHTTP1
in options forHttp2Server
node/lib/internal/http2/core.js
Line 2529 in 6d84ece
Since microservices are updated independently of each other, we need a way to provide backward compatibility for http2 plain text server. Is there a plan to provide such option for Http2Server?
The text was updated successfully, but these errors were encountered: