Skip to content

Commit 961fda2

Browse files
authored
Merge pull request #435 from Fenny/master
Bump Fasthttp v1.14.0
2 parents 2f402a5 + 1d16f99 commit 961fda2

File tree

4 files changed

+36
-22
lines changed

4 files changed

+36
-22
lines changed

app.go

+32-18
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
// Version of current package
29-
const Version = "1.10.3"
29+
const Version = "1.10.4"
3030

3131
// Map is a shortcut for map[string]interface{}, useful for JSON returns
3232
type Map map[string]interface{}
@@ -49,8 +49,9 @@ type App struct {
4949

5050
// Settings holds is a struct holding the server settings
5151
type Settings struct {
52-
// This will spawn multiple Go processes listening on the same port
53-
Prefork bool // default: false
52+
// Enables the "Server: value" HTTP header.
53+
// Default: ""
54+
ServerHeader string
5455

5556
// Enable strict routing. When enabled, the router treats "/foo" and "/foo/" as different.
5657
// By default this is disabled and both "/foo" and "/foo/" will execute the same handler.
@@ -60,49 +61,62 @@ type Settings struct {
6061
// By default this is disabled and both "/FoO" and "/foo" will execute the same handler.
6162
CaseSensitive bool
6263

63-
// Enables the "Server: value" HTTP header.
64-
ServerHeader string // default: ""
65-
6664
// Enables handler values to be immutable even if you return from handler
67-
Immutable bool // default: false
65+
// Default: false
66+
Immutable bool
6867

6968
// Enable or disable ETag header generation, since both weak and strong etags are generated
7069
// using the same hashing method (CRC-32). Weak ETags are the default when enabled.
71-
// Optional. Default value false
70+
// Default value false
7271
ETag bool
7372

73+
// This will spawn multiple Go processes listening on the same port
74+
// Default: false
75+
Prefork bool
76+
7477
// Max body size that the server accepts
75-
BodyLimit int // default: 4 * 1024 * 1024
78+
// Default: 4 * 1024 * 1024
79+
BodyLimit int
7680

7781
// Maximum number of concurrent connections.
78-
Concurrency int // default: 256 * 1024
82+
// Default: 256 * 1024
83+
Concurrency int
7984

8085
// Disable keep-alive connections, the server will close incoming connections after sending the first response to client
81-
DisableKeepalive bool // default: false
86+
// Default: false
87+
DisableKeepalive bool
8288

8389
// When set to true causes the default date header to be excluded from the response.
84-
DisableDefaultDate bool // default: false
90+
// Default: false
91+
DisableDefaultDate bool
8592

8693
// When set to true, causes the default Content-Type header to be excluded from the Response.
87-
DisableDefaultContentType bool // default: false
94+
// Default: false
95+
DisableDefaultContentType bool
8896

8997
// By default all header names are normalized: conteNT-tYPE -> Content-Type
90-
DisableHeaderNormalizing bool // default: false
98+
// Default: false
99+
DisableHeaderNormalizing bool
91100

92101
// When set to true, it will not print out the «Fiber» ASCII art and listening address
93-
DisableStartupMessage bool // default: false
102+
// Default: false
103+
DisableStartupMessage bool
94104

95105
// Templates is the interface that wraps the Render function.
106+
// Default: nil
96107
Templates Templates
97108

98109
// The amount of time allowed to read the full request including body.
99-
ReadTimeout time.Duration // default: unlimited
110+
// Default: unlimited
111+
ReadTimeout time.Duration
100112

101113
// The maximum duration before timing out writes of the response.
102-
WriteTimeout time.Duration // default: unlimited
114+
// Default: unlimited
115+
WriteTimeout time.Duration
103116

104117
// The maximum amount of time to wait for the next request when keep-alive is enabled.
105-
IdleTimeout time.Duration // default: unlimited
118+
// Default: unlimited
119+
IdleTimeout time.Duration
106120

107121
// TODO: v1.11
108122
// The router executes the same handler by default if StrictRouting or CaseSensitive is disabled.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ require (
66
github.com/gofiber/utils v0.0.3
77
github.com/gorilla/schema v1.1.0
88
github.com/valyala/bytebufferpool v1.0.0
9-
github.com/valyala/fasthttp v1.13.1
9+
github.com/valyala/fasthttp v1.14.0
1010
)

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/klauspost/compress v1.10.4 h1:jFzIFaf586tquEB5EhzQG0HwGNSlgAJpG53G6Ss
88
github.com/klauspost/compress v1.10.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
99
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
1010
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
11-
github.com/valyala/fasthttp v1.13.1 h1:Z7kVhKP9NZz+tCSY7AVhCMPPAk7b+e5fq0l/BfdTlFc=
12-
github.com/valyala/fasthttp v1.13.1/go.mod h1:ol1PCaL0dX20wC0htZ7sYCsvCYmrouYra0zHzaclZhE=
11+
github.com/valyala/fasthttp v1.14.0 h1:67bfuW9azCMwW/Jlq/C+VeihNpAuJMWkYPBig1gdi3A=
12+
github.com/valyala/fasthttp v1.14.0/go.mod h1:ol1PCaL0dX20wC0htZ7sYCsvCYmrouYra0zHzaclZhE=
1313
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
1414
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
1515
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

router_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package fiber
66

7-
// go test -v ./... -run=^$ -bench=Benchmark_Router_Handler -benchmem -count=3
7+
// go test -v ./... -run=^$ -bench=Benchmark_Router -benchmem -count=2
88

99
import (
1010
"io/ioutil"

0 commit comments

Comments
 (0)