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

proposal: net/http: add ability to know which requests are HTTP2 push requests #51340

Open
mitar opened this issue Feb 24, 2022 · 1 comment
Open

Comments

@mitar
Copy link
Contributor

mitar commented Feb 24, 2022

When I use http.Pusher interface to push a HTTP request/response, there is no way to know which requests are being pushed, once they become handled. Even more, it seems there is no way for me to tie those requests with the original request in my logging code (e.q., using request ID or something similar).

I would propose that http.PushOptions is extended with additional Context: interface{} field which allows to pass additional information to the pushed request, and that http.Request gets PushContext: interface{} field to read it out. This way I could pass through ID or even some other information which could help handle those requests faster (like internal caches or some other data I already have during handling of the original request).

@mitar mitar added the Proposal label Feb 24, 2022
@gopherbot gopherbot added this to the Proposal milestone Feb 24, 2022
@ianlancetaylor ianlancetaylor changed the title proposal: net/http: Add ability to know which requests are HTTP2 push requests proposal: net/http: add ability to know which requests are HTTP2 push requests Feb 25, 2022
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Feb 25, 2022
@ianlancetaylor
Copy link
Contributor

CC @neild @bradfitz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

3 participants