From dacbe1a1813d1e1b8f44f17b03ffe0cd9fb5ba54 Mon Sep 17 00:00:00 2001 From: Vivek V Date: Tue, 25 Feb 2020 04:53:20 +0530 Subject: [PATCH] Using strings.EualFold() for efficient string comparison (#305) --- method/method_filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/method/method_filter.go b/method/method_filter.go index 26b978f2c..d43cec7d7 100644 --- a/method/method_filter.go +++ b/method/method_filter.go @@ -117,5 +117,5 @@ func (m *Matcher) MatchResponse(res *http.Response) bool { } func (m *Matcher) matches(method string) bool { - return strings.ToUpper(method) == strings.ToUpper(m.method) + return strings.EqualFold(method, m.method) }