From 07d4a01f8c52f922482183c75b9eeb964013e4b9 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 23 Oct 2024 11:02:51 +0800 Subject: [PATCH] perf: fix command parser --- pkg/proxy/parser.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/proxy/parser.go b/pkg/proxy/parser.go index b0f11e17..580c4469 100644 --- a/pkg/proxy/parser.go +++ b/pkg/proxy/parser.go @@ -323,6 +323,7 @@ func (p *Parser) parseInputState(b []byte) []byte { if p.command == "" { p.command = strings.TrimSpace(p.readInputBuffer()) } + p.clearInputBuffer() if rule, cmd, ok := p.IsMatchCommandRule(p.command); ok { switch rule.Acl.Action { case model.ActionReject: