mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
don't write status code when the response writer was hijacked
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user