The writer should be closed when output is complete, to flush the GZip encoder buffer.
()
| 147 | |
| 148 | // The writer should be closed when output is complete, to flush the GZip encoder buffer. |
| 149 | func (w *EncodedResponseWriter) Close() { |
| 150 | if w.gz != nil { |
| 151 | ReturnGZipWriter(w.gz) |
| 152 | w.gz = nil |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // isHijackable is always false since we won't create a NewEncodedResponseWriter if the request contains the Upgrade header. |
| 157 | func (w *EncodedResponseWriter) isHijackable() bool { |
no test coverage detected