aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2024-02-21 06:51:28 +0200
committerGravatar GitHub <noreply@github.com> 2024-02-21 05:51:28 +0100
commit190204cf1a4f9999e2739d3825967df445d82d7c (patch)
treed1acd3796778b24edfd2677e52ed69a1ca3eae5c /http.go
parentRemove unnecessary build tag go1.21 (#1721) (diff)
downloadfasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.gz
fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.bz2
fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.zip
Upgrade golangci-lint to v1.56.2; fix gocritic issues (#1722)
Diffstat (limited to 'http.go')
-rw-r--r--http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.go b/http.go
index 5672301..74d66cb 100644
--- a/http.go
+++ b/http.go
@@ -1250,7 +1250,7 @@ func (req *Request) ContinueReadBody(r *bufio.Reader, maxBodySize int, preParseM
// This way we limit memory usage for large file uploads, since their contents
// is streamed into temporary files if file size exceeds defaultMaxInMemoryFileSize.
req.multipartFormBoundary = string(req.Header.MultipartFormBoundary())
- if len(req.multipartFormBoundary) > 0 && len(req.Header.peek(strContentEncoding)) == 0 {
+ if req.multipartFormBoundary != "" && len(req.Header.peek(strContentEncoding)) == 0 {
req.multipartForm, err = readMultipartForm(r, req.multipartFormBoundary, contentLength, defaultMaxInMemoryFileSize)
if err != nil {
req.Reset()
@@ -1329,7 +1329,7 @@ func (req *Request) ContinueReadBodyStream(r *bufio.Reader, maxBodySize int, pre
// This way we limit memory usage for large file uploads, since their contents
// is streamed into temporary files if file size exceeds defaultMaxInMemoryFileSize.
req.multipartFormBoundary = b2s(req.Header.MultipartFormBoundary())
- if len(req.multipartFormBoundary) > 0 && len(req.Header.peek(strContentEncoding)) == 0 {
+ if req.multipartFormBoundary != "" && len(req.Header.peek(strContentEncoding)) == 0 {
req.multipartForm, err = readMultipartForm(r, req.multipartFormBoundary, contentLength, defaultMaxInMemoryFileSize)
if err != nil {
req.Reset()