mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
fix(reverseproxy): align forwarding and tunnel semantics
This commit is contained in:
parent
c019f24e99
commit
ed44c592d3
6 changed files with 864 additions and 26 deletions
2
ecw.go
2
ecw.go
|
|
@ -197,7 +197,7 @@ func (ecw *errorCapturingResponseWriter) Written() bool {
|
|||
func (ecw *errorCapturingResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
hijacker, ok := ecw.w.(http.Hijacker)
|
||||
if !ok {
|
||||
return nil, nil, errors.New("the underlying ResponseWriter does not support the Hijacker interface")
|
||||
return nil, nil, http.ErrNotSupported
|
||||
}
|
||||
return hijacker.Hijack()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue