WAF多个相同Key的cc2统计规则不再重复累加

This commit is contained in:
GoEdgeLab
2022-07-25 09:34:34 +08:00
parent e15d491b97
commit 4b55895428
57 changed files with 189 additions and 179 deletions

View File

@@ -16,10 +16,10 @@ func TestResponseBodyCheckpoint_ResponseValue(t *testing.T) {
resp.Body = ioutil.NopCloser(bytes.NewBuffer([]byte("Hello, World")))
checkpoint := new(ResponseBodyCheckpoint)
t.Log(checkpoint.ResponseValue(nil, resp, "", nil))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil, 1))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil, 1))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil, 1))
t.Log(checkpoint.ResponseValue(nil, resp, "", nil, 1))
data, err := ioutil.ReadAll(resp.Body)
if err != nil {