diff --git a/requester.go b/requester.go index e44dcb3..039aa2f 100644 --- a/requester.go +++ b/requester.go @@ -266,7 +266,8 @@ func (r *Requester) DoRequest(req *fasthttp.Request, resp *fasthttp.Response, rr writeTo := io.Discard if resp.StatusCode() >= 500 { writeTo = r.errWriter - _, _ = r.errWriter.Write([]byte(fmt.Sprintf("\n%d %s\n", resp.StatusCode(), rr.cost))) + _, _ = r.errWriter.Write([]byte(fmt.Sprintf("\n%d %s", resp.StatusCode(), rr.cost))) + _, _ = r.errWriter.Write([]byte(fmt.Sprintf("%s\n", &resp.Header))) } err = resp.BodyWriteTo(writeTo) if err != nil {