mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
fix some typos (#2511)
This commit is contained in:
parent
77d5ae6a91
commit
3950c444b7
@ -13,7 +13,7 @@ type ContextTimeoutConfig struct {
|
||||
// Skipper defines a function to skip middleware.
|
||||
Skipper Skipper
|
||||
|
||||
// ErrorHandler is a function when error aries in middeware execution.
|
||||
// ErrorHandler is a function when error aries in middleware execution.
|
||||
ErrorHandler func(err error, c echo.Context) error
|
||||
|
||||
// Timeout configures a timeout for the middleware, defaults to 0 for no timeout
|
||||
|
@ -188,7 +188,7 @@ func TestProxyRealIPHeader(t *testing.T) {
|
||||
tests := []*struct {
|
||||
hasRealIPheader bool
|
||||
hasIPExtractor bool
|
||||
extectedXRealIP string
|
||||
expectedXRealIP string
|
||||
}{
|
||||
{false, false, remoteAddrIP},
|
||||
{false, true, extractedRealIP},
|
||||
@ -210,7 +210,7 @@ func TestProxyRealIPHeader(t *testing.T) {
|
||||
e.IPExtractor = nil
|
||||
}
|
||||
e.ServeHTTP(rec, req)
|
||||
assert.Equal(t, tt.extectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
|
||||
assert.Equal(t, tt.expectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user