aboutsummaryrefslogtreecommitdiff
path: root/http_test.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_test.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_test.go')
-rw-r--r--http_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http_test.go b/http_test.go
index a82f23e..5e2ce54 100644
--- a/http_test.go
+++ b/http_test.go
@@ -1210,7 +1210,7 @@ func TestRequestReadGzippedBody(t *testing.T) {
if r.Header.ContentLength() != len(body) {
t.Fatalf("unexpected content-length: %d. Expecting %d", r.Header.ContentLength(), len(body))
}
- if string(r.Body()) != string(body) {
+ if !bytes.Equal(r.Body(), body) {
t.Fatalf("unexpected body: %q. Expecting %q", r.Body(), body)
}
@@ -1323,7 +1323,7 @@ func TestRequestContinueReadBodyDisablePrereadMultipartForm(t *testing.T) {
t.Fatalf("The multipartForm of the Request must be nil")
}
- if string(formData) != string(r.Body()) {
+ if !bytes.Equal(formData, r.Body()) {
t.Fatalf("The body given must equal the body in the Request")
}
}