@ -183,8 +183,10 @@ func (tw *timeoutWriter) writeHeaderLocked(code int) {
func (tw *timeoutWriter) WriteHeader(code int) {
tw.mu.Lock()
defer tw.mu.Unlock()
if !tw.wroteHeader {
tw.writeHeaderLocked(code)
}
func checkWriteHeaderCode(code int) {
if code < 100 || code > 599 {