File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ func newFasthttpServer(cfg Config) *fasthttp.Server {
109
109
ConnState : cfg .ConnState ,
110
110
Logger : cfg .Logger ,
111
111
TLSConfig : cfg .TLSConfig ,
112
+ FormValueFunc : cfg .FormValueFunc ,
112
113
}
113
114
}
114
115
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import (
24
24
var notConfigFasthttpFields = []string {
25
25
"Handler" ,
26
26
"ErrorHandler" ,
27
- "MaxKeepaliveDuration" , // Deprecated: Use IdleTimeout instead.
28
27
}
29
28
30
29
func Test_New (t * testing.T ) { //nolint:funlen,gocognit,gocyclo
@@ -231,6 +230,7 @@ func Test_newFasthttpServer(t *testing.T) { //nolint:funlen
231
230
ConnState : func (net.Conn , fasthttp.ConnState ) {},
232
231
Logger : testLog ,
233
232
TLSConfig : & tls.Config {ServerName : "test" , MinVersion : tls .VersionTLS13 },
233
+ FormValueFunc : func (ctx * fasthttp.RequestCtx , key string ) []byte { return nil },
234
234
}
235
235
236
236
srv := newFasthttpServer (cfg )
Original file line number Diff line number Diff line change @@ -354,6 +354,12 @@ type Config struct { // nolint:maligned
354
354
// called when a client connection changes state. See the
355
355
// ConnState type and associated constants for details.
356
356
ConnState func (net.Conn , fasthttp.ConnState )
357
+
358
+ // FormValueFunc, which is used by RequestCtx.FormValue and support for customising
359
+ // the behaviour of the RequestCtx.FormValue function.
360
+ //
361
+ // NetHttpFormValueFunc gives a FormValueFunc func implementation that is consistent with net/http.
362
+ FormValueFunc fasthttp.FormValueFunc
357
363
}
358
364
359
365
// StaticFS represents settings for serving static files
You can’t perform that action at this time.
0 commit comments