If a caller passed in a map retained within the callers context as
extraHeaders to gin.Context.DataFromReader() then a race to write the
"Content-Lenght" header would occur.
// globalHeader is passed to gin.Context.DataFromReader
var globalHeaders = map[string]string{
"cache-control": "public, max-age=3600",
}
func (c *gin.Context) {
//...
// DataFromReader must not write to globalHeaders
c.DataFromReader(code, contentLength, contentType, reader,
globalHeaders)
}