From 4d65e88a2c3d0d3ec6be46feb2c7996bd710ec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vitor?= <39197618+ancogamer@users.noreply.github.com> Date: Sun, 12 Jun 2022 13:33:01 -0300 Subject: [PATCH] Spliting dump request to add Query (#1909) Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request. --- app.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.go b/app.go index 85029c67..cffca5f9 100644 --- a/app.go +++ b/app.go @@ -9,6 +9,7 @@ package fiber import ( "bufio" + "bytes" "crypto/tls" "crypto/x509" "errors" @@ -974,6 +975,11 @@ func (app *App) Test(req *http.Request, msTimeout ...int) (resp *http.Response, return nil, err } + // adding back the query from URL, since dump cleans it + dumps := bytes.Split(dump, []byte(" ")) + dumps[1] = []byte(req.URL.String()) + dump = bytes.Join(dumps, []byte(" ")) + // Create test connection conn := new(testConn)