reverting change and adding check on matched flag

dev
mzack 2021-06-26 02:03:20 +02:00
parent 1687bdd7c3
commit f8ae8aa86f
1 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,10 @@ func (r *Request) responseToDSLMap(resp *http.Response, host, matched, rawReq, r
// MakeResultEvent creates a result event from internal wrapped event // MakeResultEvent creates a result event from internal wrapped event
func (r *Request) MakeResultEvent(wrapped *output.InternalWrappedEvent) []*output.ResultEvent { 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) results := make([]*output.ResultEvent, 0, len(wrapped.OperatorsResult.Matches)+1)
// If we have multiple matchers with names, write each of them separately. // If we have multiple matchers with names, write each of them separately.