We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af28d12 commit c8dcb95Copy full SHA for c8dcb95
rpc/http.go
@@ -181,7 +181,7 @@ func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
181
// All checks passed, create a codec that reads direct from the request body
182
// untilEOF and writes the response to w and order the server to process a
183
// single request.
184
- ctx := context.Background()
+ ctx := r.Context()
185
ctx = context.WithValue(ctx, "remote", r.RemoteAddr)
186
ctx = context.WithValue(ctx, "scheme", r.Proto)
187
ctx = context.WithValue(ctx, "local", r.Host)
0 commit comments