-
Notifications
You must be signed in to change notification settings - Fork 21
Description
HTTP/2
Support for HTTP/2 in Express is something the community has been requesting, as can be seen in the following issues:
- Support for Node.js 8 native http2 compression#122
- http/2 initiative express#5462
- Feature request: friendly exposure of req/res logic for HTTP/2 push promises express#2781
- Support for module http2? express#2761
A specific package was even created to provide this support, such as http2-express-bridge
(expressjs/express#2781), although it is no longer maintained.
What is needed?
In order for HTTP/2 support to be properly implemented in Express, several changes need to be made across different packages within the ecosystem. Some packages already have tests for HTTP/2 compatibility
Additional Notes
Keep in mind that HTTP/2 is a different protocol, so it is likely that some of the current Express dependencies and middlewares may no longer be necessary or will need to be adapted.
- express
- accepts (jshttp) (No changes are needed in this package :) )
- body_parser (express) (Add tests and possible changes to the package)
- content-type (jshttp) (No changes are needed in this package :) )
- cookie (jshttp) (No changes are needed in this package :) )
- content_disposition (No changes are needed in this package :) )
- encodeurl (pillarjs) (No changes needed)
- etag (jshttp) (No changes are needed in this package :) )
- forwarded (jshttp) (No changes are needed in this package :) )
- finalhandler (pillarjs) (it needs to be investigated to determine whether tests or changes are required in the package)
- fresh (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package.)
- http_errors (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package)
- media_typer (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package)
- mime_db (jshttp) (No changes needed)
- negotiator (jshttp) (No changes needed)
- on_finished (jshttp) (Needs changes and tests)
- parseurl (pillarjs) (It needs to be investigated to determine whether tests or changes are required in the package)
- path_to_regexp (pillarjs) (No changes needed)
- proxy_addr (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package)
- range-parse (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package)
- router (pillarjs) (Needs changes and tests)
- send (pillarjs) (It needs to be investigated to determine whether tests or changes are required in the package)
- serve_static (expressjs)(It needs to be investigated to determine whether tests or changes are required in the package)
- statuses (jshttp)(It needs to be investigated to determine whether tests or changes are required in the package)
- type_is (jshttp)(It needs to be investigated to determine whether tests or changes are required in the package)
- vary (jshttp) (It needs to be investigated to determine whether tests or changes are required in the package)
- compression
- on-headers (jshttp) (Needs changes and tests)
- on-finished (jshttp) (Version 2 of compression has this dependency)
- session
- cookie-signature
- multer
- append-field
- busboy / @fastify/busboy
- concat-stream
- type-is
- xtend
- timeout
- reponse-time
- basic-auth-connect
- cors
- vhost
- cookie-session
- serve-favicon
- morgan
- errorhandler
- cookies
- multiparty
- resolve-path
I’m going to start from the lower-level packages and work my way up to Express. If anyone wants to help, you’re more than welcome!
(I know QUIC exist, but they are not yet officially available in Node.js (see nodejs/node#57281). It will still take some time for support to land in Node.js so we can begin the integration. That’s why I think it makes sense to first add support for HTTP/2, and later, once QUIC is supported, integrate it as well.)