Skip to content

Commit

Permalink
RedirectTrailingSlash has no effect unless RedirectFixedPath is set
Browse files Browse the repository at this point in the history
Which is not likely the desired behavior.

RedirectTrailingSlash setting is meant to cause a redirect, but the code is never called because the setting wasn't being checked. Instead RedirectFixedPath was being checked.
  • Loading branch information
error10 committed Jul 4, 2015
1 parent 0316b73 commit 2b8ed80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (engine *Engine) handleHTTPRequest(context *Context) {
return

} else if httpMethod != "CONNECT" && path != "/" {
if tsr && engine.RedirectFixedPath {
if tsr && engine.RedirectTrailingSlash {
redirectTrailingSlash(context)
return
}
Expand Down

0 comments on commit 2b8ed80

Please sign in to comment.