We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3540ace commit 2e86d63Copy full SHA for 2e86d63
api.go
@@ -10,6 +10,7 @@ import (
10
"log"
11
"net/http"
12
"regexp"
13
+ "strings"
14
15
"github.com/go-rs/rest-api-framework/utils"
16
)
@@ -169,7 +170,7 @@ func (api API) ServeHTTP(res http.ResponseWriter, req *http.Request) {
169
170
break
171
}
172
- if (route.method == "" || route.method == req.Method) && route.regex.Match(urlPath) {
173
+ if (route.method == "" || strings.EqualFold(route.method, req.Method)) && route.regex.Match(urlPath) {
174
ctx.found = route.method != "" //?
175
ctx.Params = utils.Exec(route.regex, route.params, urlPath)
176
route.handle(&ctx)
0 commit comments