mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-08 17:05:45 +02:00
chore: remove Hijack
This commit is contained in:
parent
aee01d139c
commit
fa701d0725
@ -4,9 +4,6 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"net"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -86,14 +83,6 @@ func (r *Response) Before(f func(ResponseWriter)) {
|
||||
r.befores = append(r.befores, f)
|
||||
}
|
||||
|
||||
func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
if h, ok := r.ResponseWriter.(http.Hijacker); ok {
|
||||
return h.Hijack()
|
||||
}
|
||||
|
||||
return nil, nil, errors.New("unimplemented http.Hijacker ")
|
||||
}
|
||||
|
||||
// NewResponse creates a response
|
||||
func NewResponse(resp http.ResponseWriter) *Response {
|
||||
if v, ok := resp.(*Response); ok {
|
||||
|
Loading…
x
Reference in New Issue
Block a user