(statusCode int)
| 488 | } |
| 489 | |
| 490 | func (t *timeoutResponseWriter) writeHeaderLocked(statusCode int) { |
| 491 | if t.wroteHeader { |
| 492 | // ignore multiple calls to WriteHeader |
| 493 | // once WriteHeader has been called once, a snapshot of the header map is taken |
| 494 | // and saved in snapHeader to be used in finallyWrite |
| 495 | return |
| 496 | } |
| 497 | |
| 498 | t.statusCode = statusCode |
| 499 | t.wroteHeader = true |
| 500 | t.snapHeader = t.header.Clone() |
| 501 | } |
| 502 | |
| 503 | func (t *timeoutResponseWriter) finallyWrite(w http.ResponseWriter) { |
| 504 | t.Lock() |
no outgoing calls
no test coverage detected