diff --git a/web/middleware/options.go b/web/middleware/options.go index c8ed63c..d267ca9 100644 --- a/web/middleware/options.go +++ b/web/middleware/options.go @@ -18,7 +18,7 @@ func AutomaticOptions(c *web.C, h http.Handler) http.Handler { // 404 route anyways. var fw *httptest.ResponseRecorder pw := w - if strings.ToUpper(r.Method) == "OPTIONS" { + if r.Method == "OPTIONS" { fw = httptest.NewRecorder() pw = fw } diff --git a/web/router.go b/web/router.go index 02315da..86041ef 100644 --- a/web/router.go +++ b/web/router.go @@ -129,7 +129,7 @@ func parseHandler(h interface{}) Handler { } func httpMethod(mname string) method { - if method, ok := validMethodsMap[strings.ToUpper(mname)]; ok { + if method, ok := validMethodsMap[mname]; ok { return method } return mIDK