From fb093cda6cb18f09cc258b85aeb20a02166bdbf7 Mon Sep 17 00:00:00 2001 From: eleven26 Date: Tue, 12 Jul 2022 17:23:46 +0800 Subject: [PATCH] Support for case-insensitive HTTP methods. --- gin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gin.go b/gin.go index f9324299..2d4fbf8d 100644 --- a/gin.go +++ b/gin.go @@ -586,7 +586,7 @@ func (engine *Engine) HandleContext(c *Context) { } func (engine *Engine) handleHTTPRequest(c *Context) { - httpMethod := c.Request.Method + httpMethod := strings.ToUpper(c.Request.Method) rPath := c.Request.URL.Path unescape := false if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {