From f8ae8aa86fed369f043893e4a94f88d14751af82 Mon Sep 17 00:00:00 2001 From: mzack Date: Sat, 26 Jun 2021 02:03:20 +0200 Subject: [PATCH] reverting change and adding check on matched flag --- v2/pkg/protocols/http/operators.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v2/pkg/protocols/http/operators.go b/v2/pkg/protocols/http/operators.go index b43c2553..3f0a63ea 100644 --- a/v2/pkg/protocols/http/operators.go +++ b/v2/pkg/protocols/http/operators.go @@ -111,6 +111,10 @@ func (r *Request) responseToDSLMap(resp *http.Response, host, matched, rawReq, r // MakeResultEvent creates a result event from internal wrapped event func (r *Request) MakeResultEvent(wrapped *output.InternalWrappedEvent) []*output.ResultEvent { + if len(wrapped.OperatorsResult.DynamicValues) > 0 && !wrapped.OperatorsResult.Matched { + return nil + } + results := make([]*output.ResultEvent, 0, len(wrapped.OperatorsResult.Matches)+1) // If we have multiple matchers with names, write each of them separately.