diff options
Diffstat (limited to 'service/http/response.go')
-rw-r--r-- | service/http/response.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/service/http/response.go b/service/http/response.go index 0942b3d2..f34754be 100644 --- a/service/http/response.go +++ b/service/http/response.go @@ -1,14 +1,16 @@ package http import ( - json "github.com/json-iterator/go" "io" "net/http" "strings" + json "github.com/json-iterator/go" + "github.com/spiral/roadrunner" ) + // Response handles PSR7 response logic. type Response struct { // Status contains response status. @@ -57,7 +59,7 @@ func (r *Response) Write(w http.ResponseWriter) error { if data, ok := r.body.([]byte); ok { _, err := w.Write(data) if err != nil { - return err + return handleWriteError(err) } } |