-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
How to support HTTP 103 Early Hints? #4938
Comments
The Node.js server Express.js is built on does not yet support 103, only 100, 101 and 102. You'll want to petition Node.js to add 103 support to their HTTP server so it can be made available in Express.js and other frameworks built on Node.js HTTP. |
@dougwilson Node.js looks to have merged this nodejs/node#44180. However, I don't think it has been included in a Node.js release (yet). What are the odds this can be revisited/reopened? Obviously this leads to a lot more questions. What is Express.js's policy about new Node.js changes that aren't back-ported? Express.js currently supports Node.js >=0.10.0, and I'd be shocked if that PR gets back-ported that far. How many Node.js versions should this be included in before Express.js supports this feature? etc. |
Hi @fishcharlie I'm not sure what needs to be re-opened? Until that lands, it isn't possible to send the 103 response in Express.js since Node.js does not support it. Once that PR lands in Node.js, the API is automatically available in Express.js when used with that Node.js version. But Express.js cannot backport things to old Node.js versions, only the Node.js project can... Please let me know if I'm missing something. |
@dougwilson Thanks so much for the reply. Everything (minus one part) you said makes sense and I agree with all of it.
This is the part I'm slightly confused about. I was under the impression that Express.js was basically a wrapper around the Node.js HTTP package. Therefore, wouldn't the wrapper need to be updated to support that new method? Methods such as So shouldn't Express.js (at some point) add a new method for the |
No, it's not a wrapper, it is inheritance. Anything on the Node.js response is on the Express.js response, because it's just class inheritance. The Express.js response is just a subclass of the Node.js response. You'll notice you can call |
Node supported since 18.11.0 for http and http2. Any plans for official support on express? (+@dougwilson ) |
If you would like to open a new issue for this, please do. We are not going to revive this old one for now. And if so, can you add more details to make the case for this, or at least make a abbreviated summary of this conversation. |
hi,
WIth Chrome 103, the HTTP
103 Early Hints
is in release build. But how to support this in expressjs? Thanks!!https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103
https://developer.chrome.com/blog/new-in-chrome-103/
The text was updated successfully, but these errors were encountered: