Skip to content
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

HTTP 103 Early Hints #196

Closed
ronag opened this issue May 26, 2020 · 9 comments
Closed

HTTP 103 Early Hints #196

ronag opened this issue May 26, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@ronag
Copy link
Member

ronag commented May 26, 2020

https://evertpot.com/http/103-early-hints

Request from: #179

Related topic; how would HTTP 103 Early Hints play out? It would be very nice to have a way to get the early hints data in a way before the header and body.

I have a real use case for 103.

@trygve-lie

@ronag ronag added the enhancement New feature or request label May 26, 2020
@ronag
Copy link
Member Author

ronag commented May 26, 2020

I'm unsure if https://www.npmjs.com/package/http-parser-js supports this.

@ronag
Copy link
Member Author

ronag commented May 26, 2020

Does Node core supports this? @mcollina do you know?

@ronag ronag changed the title 103 Early Hints HTTP 103 Early Hints May 26, 2020
@mcollina
Copy link
Member

I think Node.js core support this.

@trygve-lie
Copy link

Yeah. Node.js core supports it: nodejs/node#16644

@ronag ronag modified the milestone: Next Release May 26, 2020
@ronag
Copy link
Member Author

ronag commented May 26, 2020

@mcollina @szmarczak @delvedor I don't really see an elegant way forward given the current API to support 1xx informational responses... I am little concerned about this. Would like to try to avoid future significant breaking API changes.

Maybe in the client.stream API we could invoke the handler multiple times and when the body is nully then it should be interpreted as informational response? This approach kind of could work with client.pipeline as well but would be a bit weird. This would however need to be documented (might as well add it). However, I have no good ideas for client.request maybe return an async generator?

100 Continue - Probably no big deal if we don't support.
101 Switching Protocols - Should make it at least possible for the user to perform the switch.
102 Processing (WebDAV; RFC 2518) - Probably no big deal if we don't support.
103 Early Hints (RFC 8297) - Not sure... would be nice

Ideas?

@ronag
Copy link
Member Author

ronag commented May 26, 2020

If we don't support 101 should we throw on method CONNECT?

@mcollina
Copy link
Member

Throw on 101.

I'm happy with the rest.

@ronag
Copy link
Member Author

ronag commented May 27, 2020

I'm happy with the rest.

I assume you mean that you are happy with the status quo? i.e. no 103 support.

@mcollina
Copy link
Member

I'm happy to cut a release with no 103 early hints.

@trygve-lie what's your use case?

ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 1, 2020
ronag added a commit that referenced this issue Aug 2, 2020
ronag added a commit that referenced this issue Aug 2, 2020
ronag added a commit that referenced this issue Aug 2, 2020
@ronag ronag closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants