forked from mirror/gin
use std http method constant instead of raw string (#2782)
This commit is contained in:
parent
c7a28f8532
commit
3116a2d7a1
2
gin.go
2
gin.go
|
@ -539,7 +539,7 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
|
|||
c.writermem.WriteHeaderNow()
|
||||
return
|
||||
}
|
||||
if httpMethod != "CONNECT" && rPath != "/" {
|
||||
if httpMethod != http.MethodConnect && rPath != "/" {
|
||||
if value.tsr && engine.RedirectTrailingSlash {
|
||||
redirectTrailingSlash(c)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue