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).
The text was updated successfully, but these errors were encountered:
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
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 additionalContext: interface{}
field which allows to pass additional information to the pushed request, and thathttp.Request
getsPushContext: 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).The text was updated successfully, but these errors were encountered: