freeconf / restconf

Implementation of RESTCONF Management protocol - IETF RFC8040

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ServeHTTP in server is not using Request context

HRogge opened this issue · comments

The ServeHTTP() function in server.go does create its own context based on context.Background(). Is there a special reason not to use r.Context() ? Using the http.Request context (which is normally context.Background()) should make it easier to handle situations with http based context interruptions.

I can see if I can work on it tomorrow... it came up while I added the new constructor for "no internal HTTP server"