mirror of https://github.com/gin-gonic/gin.git
Merge pull request #363 from error10/patch-1
RedirectTrailingSlash has no effect unless RedirectFixedPath is set
This commit is contained in:
commit
13b88673a2
2
gin.go
2
gin.go
|
@ -294,7 +294,7 @@ func (engine *Engine) handleHTTPRequest(context *Context) {
|
||||||
return
|
return
|
||||||
|
|
||||||
} else if httpMethod != "CONNECT" && path != "/" {
|
} else if httpMethod != "CONNECT" && path != "/" {
|
||||||
if tsr && engine.RedirectFixedPath {
|
if tsr && engine.RedirectTrailingSlash {
|
||||||
redirectTrailingSlash(context)
|
redirectTrailingSlash(context)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue