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

Defer push response headers in http2 #36

Open
BernzSed opened this issue Jan 11, 2017 · 1 comment
Open

Defer push response headers in http2 #36

BernzSed opened this issue Jan 11, 2017 · 1 comment

Comments

@BernzSed
Copy link

Thanks for giving us such an awesome node module!

In HTTP/2, the response headers and status code for a pushed resource shouldn't have to be sent immediately.
It would be very useful if we had the option to defer sending the response headers and status code, giving us the chance to fetch them from another server along with the response body.

The relevant code seems to be in http2/framer.js, in pushFrame(), in the callback to _checkPush. The status code and response headers are compressed and sent immediately.

@sebdeckers
Copy link

sebdeckers commented Feb 6, 2017

I would also like to see the push API changed to return a transport.Stream in the reserved state, before the response's HEADERS frame is sent. This would match the other implementations:

  • The node-http2 library returns a ServerResponse. (Source)
  • The Node.js 8+ experimental http2 implementation returns a ServerHttp2Stream. (Source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants