|
|
@ -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 }
|
|
|
|
|
|
|
|
|
|
|
|