Merge pull request #16 from moorereason/fix-notrule

Fix infinite loop in NotRule.Evaluate
This commit is contained in:
Adnan Hajdarević 2015-03-20 23:37:49 +01:00
commit bddb523b67

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