Fix infinite loop in NotRule.Evaluate

This commit is contained in:
Cameron Moore 2015-03-20 16:58:58 -05:00
parent 84ce6f262a
commit becd8935be

View file

@ -225,7 +225,7 @@ type NotRule Rules
// Evaluate NotRule will return true if and only if ChildRule evaluates to false // Evaluate NotRule will return true if and only if ChildRule evaluates to false
func (r NotRule) Evaluate(headers, query, payload *map[string]interface{}, body *[]byte) bool { func (r NotRule) Evaluate(headers, query, payload *map[string]interface{}, body *[]byte) bool {
return !r.Evaluate(headers, query, payload, body) return !Rules(r).Evaluate(headers, query, payload, body)
} }
// MatchRule will evaluate to true based on the type // MatchRule will evaluate to true based on the type