mirror of https://github.com/gofiber/fiber.git
Merge branch 'master' into v3-beta
commit
07e847b3c1
|
@ -5,7 +5,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.18.x]
|
go-version: [1.18.x]
|
||||||
platform: [ubuntu-latest, windows-latest]
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
|
@ -32,4 +32,3 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Run Test
|
- name: Run Test
|
||||||
run: go test ./... -v -race
|
run: go test ./... -v -race
|
||||||
|
|
||||||
|
|
8
app.go
8
app.go
|
@ -9,6 +9,7 @@ package fiber
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"bytes"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"errors"
|
"errors"
|
||||||
|
@ -85,7 +86,7 @@ type ErrorHandler = func(*Ctx, error) error
|
||||||
|
|
||||||
// Error represents an error that occurred while handling a request.
|
// Error represents an error that occurred while handling a request.
|
||||||
type Error struct {
|
type Error struct {
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Message any `json:"message"`
|
Message any `json:"message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,6 +968,11 @@ func (app *App) Test(req *http.Request, msTimeout ...int) (resp *http.Response,
|
||||||
return nil, err
|
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
|
// Create test connection
|
||||||
conn := new(testConn)
|
conn := new(testConn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue