()
| 254 | } |
| 255 | |
| 256 | func (w *pipeResponseWriter) finish() { |
| 257 | if w.wasHijacked { |
| 258 | return |
| 259 | } |
| 260 | if !w.wroteHeader { |
| 261 | w.WriteHeader(http.StatusInternalServerError) |
| 262 | } |
| 263 | if !w.sentResponse { |
| 264 | w.sendResponse() |
| 265 | } |
| 266 | w.pw.Close() |
| 267 | <-w.done |
| 268 | } |
| 269 | |
| 270 | func (w *pipeResponseWriter) sendResponse() { |
| 271 | if w.sentResponse { |
no test coverage detected