mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +08:00
Support for case-insensitive HTTP methods.
This commit is contained in:
parent
b57163a0e4
commit
fb093cda6c
2
gin.go
2
gin.go
@ -586,7 +586,7 @@ func (engine *Engine) HandleContext(c *Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (engine *Engine) handleHTTPRequest(c *Context) {
|
func (engine *Engine) handleHTTPRequest(c *Context) {
|
||||||
httpMethod := c.Request.Method
|
httpMethod := strings.ToUpper(c.Request.Method)
|
||||||
rPath := c.Request.URL.Path
|
rPath := c.Request.URL.Path
|
||||||
unescape := false
|
unescape := false
|
||||||
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
|
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user