Skip to content

Commit

Permalink
Spliting dump request to add Query (gofiber#1909)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ancogamer authored and trim21 committed Aug 15, 2022
1 parent 53fcf4b commit 7ebd09b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.go
Expand Up @@ -9,6 +9,7 @@ package fiber

import (
"bufio"
"bytes"
"crypto/tls"
"crypto/x509"
"errors"
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 7ebd09b

Please sign in to comment.