Skip to content

Commit

Permalink
Leaving a comment in iPrefixMatcher per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
herbrandson committed Sep 20, 2018
1 parent 53b26b2 commit 972d851
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions route/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func globMatcher(uri string, r *Route) bool {

// iPrefixMatcher matches path to the routes' path ignoring case
func iPrefixMatcher(uri string, r *Route) bool {
// todo(fs): if this turns out to be a performance issue we should cache
// todo(fs): strings.ToLower(r.Path) in r.PathLower
lowerURI := strings.ToLower(uri)
lowerPath := strings.ToLower(r.Path)
return strings.HasPrefix(lowerURI, lowerPath)
Expand Down

0 comments on commit 972d851

Please sign in to comment.