WriteHeader intercepts any header writes and removes the Content-Length header.
(status int)
| 312 | |
| 313 | // WriteHeader intercepts any header writes and removes the Content-Length header. |
| 314 | func (w *responseWriter) WriteHeader(status int) { |
| 315 | w.ResponseWriter.Header().Del("Content-Length") |
| 316 | w.ResponseWriter.WriteHeader(status) |
| 317 | } |
| 318 | |
| 319 | // Write intercepts any writes to the response writer. |
| 320 | // The first write will extract the Content-Type as the mediatype. Otherwise it falls back to the RequestURI extension. |