diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2022-07-29 19:03:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 19:03:15 +0200 |
commit | a5f448fc970972ab47113971d898a22fb28fef52 (patch) | |
tree | 826fe1e91cdca5002f7db0bef4b8dfdcf55efddc /header.go | |
parent | Prevent overflow and panic on large HTTP responses (#1351) (diff) | |
download | fasthttp-a5f448fc970972ab47113971d898a22fb28fef52.tar.gz fasthttp-a5f448fc970972ab47113971d898a22fb28fef52.tar.bz2 fasthttp-a5f448fc970972ab47113971d898a22fb28fef52.zip |
Improve Client timeout (#1346)
Don't run requests in a separate Goroutine anymore. Instead use proper
conn deadlines to enforce timeouts.
- Also contains some linting fixes.
Diffstat (limited to 'header.go')
-rw-r--r-- | header.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -868,7 +868,7 @@ func (h *RequestHeader) HasAcceptEncodingBytes(acceptEncoding []byte) bool { // i.e. the number of times f is called in VisitAll. func (h *ResponseHeader) Len() int { n := 0 - h.VisitAll(func(k, v []byte) { n++ }) + h.VisitAll(func(_, _ []byte) { n++ }) return n } @@ -876,7 +876,7 @@ func (h *ResponseHeader) Len() int { // i.e. the number of times f is called in VisitAll. func (h *RequestHeader) Len() int { n := 0 - h.VisitAll(func(k, v []byte) { n++ }) + h.VisitAll(func(_, _ []byte) { n++ }) return n } @@ -1077,7 +1077,7 @@ func (h *ResponseHeader) VisitAll(f func(key, value []byte)) { f(strServer, server) } if len(h.cookies) > 0 { - visitArgs(h.cookies, func(k, v []byte) { + visitArgs(h.cookies, func(_, v []byte) { f(strSetCookie, v) }) } |