don't write status code when the response writer was hijacked

This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-01-10 17:51:52 +02:00
parent acc3a0b9a3
commit 4246ef6980
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
- Version : **6.0.0**
- Version : **6.0.8**
- Operating System:

View File

@ -198,6 +198,7 @@ func (w *responseWriter) SetContentType(cType string) {
// or clear those deadlines as needed.
func (w *responseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
if h, isHijacker := w.ResponseWriter.(http.Hijacker); isHijacker {
w.statusCodeSent = true
return h.Hijack()
}