mirror of https://github.com/gofiber/fiber.git
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.pull/1943/head
parent
3bb4b7ed41
commit
4d65e88a2c
6
app.go
6
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue