From 2b8ed80da0b442818a2e3a06e331e149be484bfa Mon Sep 17 00:00:00 2001
From: error10 <error@ioerror.us>
Date: Sat, 4 Jul 2015 00:05:53 -0400
Subject: [PATCH] RedirectTrailingSlash has no effect unless RedirectFixedPath
 is set

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.
---
 gin.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gin.go b/gin.go
index 6625421c..a7e83140 100644
--- a/gin.go
+++ b/gin.go
@@ -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
 				}