Skip to content

Commit

Permalink
Fix wafbench (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Dec 18, 2024
1 parent c71d238 commit bedd3e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wafbench/wafbench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ SecRule REQUEST_HEADERS:X-CRS-Test "@rx ^.*$" \
payload := strings.Repeat("a", size)
b.Run(fmt.Sprintf("POST/%d", size), func(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := http.Post(s.URL+"/anything", "text/plain", strings.NewReader(payload))
resp, err := http.Post(s.URL+"/anything", "text/plain", strings.NewReader(payload))
if err != nil {
b.Error(err)
}
resp.Body.Close()
}
})
}
Expand Down

0 comments on commit bedd3e2

Please sign in to comment.