(statusCode int)
| 20 | } |
| 21 | |
| 22 | func (r *responseWrapper) WriteHeader(statusCode int) { |
| 23 | |
| 24 | // we need to unset cookies before writing the header |
| 25 | if statusCode == http.StatusUnauthorized { |
| 26 | r.Middleware.UnsetAuthToken(r.ResponseWriter) |
| 27 | r.Middleware.UnsetCSRFToken(r.ResponseWriter) |
| 28 | } |
| 29 | |
| 30 | r.ResponseWriter.WriteHeader(statusCode) |
| 31 | } |
| 32 | |
| 33 | func (r *responseWrapper) Flush() { |
| 34 | r.ResponseWriter.(http.Flusher).Flush() |