mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-04 06:53:36 +00:00
proxy: recognize client's cancellation
fix issue #1589 Signed-off-by: Tw <tw19881113@gmail.com>
This commit is contained in:
parent
705cb98865
commit
0146bb4e49
7 changed files with 87 additions and 41 deletions
|
|
@ -2,7 +2,6 @@ package httpserver
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"errors"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
|
@ -103,7 +102,7 @@ func (r *ResponseRecorder) Push(target string, opts *http.PushOptions) error {
|
|||
return pusher.Push(target, opts)
|
||||
}
|
||||
|
||||
return errors.New("push is unavailable (probably chained http.ResponseWriter does not implement http.Pusher)")
|
||||
return NonPusherError{Underlying: r.ResponseWriter}
|
||||
}
|
||||
|
||||
// Interface guards
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue