Skip to content

Commit dacbe1a

Browse files
authored
Using strings.EualFold() for efficient string comparison (#305)
1 parent 5f8cb63 commit dacbe1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

method/method_filter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,5 @@ func (m *Matcher) MatchResponse(res *http.Response) bool {
117117
}
118118

119119
func (m *Matcher) matches(method string) bool {
120-
return strings.ToUpper(method) == strings.ToUpper(m.method)
120+
return strings.EqualFold(method, m.method)
121121
}

0 commit comments

Comments
 (0)