diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2024-02-21 06:51:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 05:51:28 +0100 |
commit | 190204cf1a4f9999e2739d3825967df445d82d7c (patch) | |
tree | d1acd3796778b24edfd2677e52ed69a1ca3eae5c /http.go | |
parent | Remove unnecessary build tag go1.21 (#1721) (diff) | |
download | fasthttp-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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |