mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
Update timeouthandler.go
This commit is contained in:
parent
e964e530e1
commit
703fb8d970
@ -125,6 +125,14 @@ type timeoutWriter struct {
|
|||||||
|
|
||||||
var _ http.Pusher = (*timeoutWriter)(nil)
|
var _ http.Pusher = (*timeoutWriter)(nil)
|
||||||
|
|
||||||
|
func (tw *timeoutWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||||
|
if hijacked, ok := tw.w.(http.Hijacker); ok {
|
||||||
|
return hijacked.Hijack()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, nil, errors.New("server doesn't support hijacking")
|
||||||
|
}
|
||||||
|
|
||||||
// Header returns the underline temporary http.Header.
|
// Header returns the underline temporary http.Header.
|
||||||
func (tw *timeoutWriter) Header() http.Header { return tw.h }
|
func (tw *timeoutWriter) Header() http.Header { return tw.h }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user