Skip to content

Commit

Permalink
Using strings.EualFold() for efficient string comparison (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekv96 committed Feb 24, 2020
1 parent 5f8cb63 commit dacbe1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion method/method_filter.go
Expand Up @@ -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)
}

0 comments on commit dacbe1a

Please sign in to comment.