diff options
author | Valery Piashchynski <[email protected]> | 2019-11-17 18:13:15 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2019-11-17 18:13:15 +0300 |
commit | a7982f6e692e9dc40f035d5f1486cb2bbae71f88 (patch) | |
tree | ab4b32c190bc8bffd9b1b99b806e03192729c59a /service/http/response.go | |
parent | c463235f55cdae5fa7c63a87e7cc73c6e535d27a (diff) |
finish the check
Diffstat (limited to 'service/http/response.go')
-rw-r--r-- | service/http/response.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/service/http/response.go b/service/http/response.go index 8bd770ec..7102f078 100644 --- a/service/http/response.go +++ b/service/http/response.go @@ -35,7 +35,10 @@ func (r *Response) Write(w http.ResponseWriter) error { for _, v := range h { if n == "http2-push" { if pusher, ok := w.(http.Pusher); ok { - pusher.Push(v, nil) + err := pusher.Push(v, nil) + if err != nil { + return err + } } continue @@ -48,7 +51,10 @@ func (r *Response) Write(w http.ResponseWriter) error { w.WriteHeader(r.Status) if data, ok := r.body.([]byte); ok { - w.Write(data) + _, err := w.Write(data) + if err != nil { + return err + } } if rc, ok := r.body.(io.Reader); ok { |