`http: superfluous response.WriteHeader call from github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics.func1.1 (capture_metrics.go:53)`
I sometimes get this error in my logs when serving static files with `http.ServeContent`.
Not sure how this happens if the wrapper is working correctly but the logs don't lie. Maybe `ServeContent` is somehow getting direct access to the underlying writer?
@infogulch I was seeing this error as well on my endpoints served by http.FileServer.
In my case, it was caused by me calling ServeHttp on the handler that I was also passing to CaptureMetrics. I didn't realise that CaptureMetrics runs ServeHttp on the Handler that you pass to it. Removing my additional direct call to ServeHttp on the original handler fixed the issue.