mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
👷 Should not force Agent.dest to Agent.dest[:0]
This commit is contained in:
parent
2772af030e
commit
f9d1074635
@ -750,7 +750,7 @@ func (a *Agent) Bytes() (code int, body []byte, errs []error) {
|
||||
code = resp.StatusCode()
|
||||
}
|
||||
|
||||
body = append(a.dest[:0], resp.Body()...)
|
||||
body = append(a.dest, resp.Body()...)
|
||||
|
||||
if nilResp {
|
||||
ReleaseResponse(resp)
|
||||
|
@ -537,7 +537,7 @@ func Test_Client_Agent_Dest(t *testing.T) {
|
||||
|
||||
a.HostClient.Dial = func(addr string) (net.Conn, error) { return ln.Dial() }
|
||||
|
||||
code, body, errs := a.Dest(dest).String()
|
||||
code, body, errs := a.Dest(dest[:0]).String()
|
||||
|
||||
utils.AssertEqual(t, StatusOK, code)
|
||||
utils.AssertEqual(t, "dest", body)
|
||||
@ -552,7 +552,7 @@ func Test_Client_Agent_Dest(t *testing.T) {
|
||||
|
||||
a.HostClient.Dial = func(addr string) (net.Conn, error) { return ln.Dial() }
|
||||
|
||||
code, body, errs := a.Dest(dest).String()
|
||||
code, body, errs := a.Dest(dest[:0]).String()
|
||||
|
||||
utils.AssertEqual(t, StatusOK, code)
|
||||
utils.AssertEqual(t, "dest", body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user