Explorar el Código

Merge pull request #363 from error10/patch-1

RedirectTrailingSlash has no effect unless RedirectFixedPath is set
Manu Mtz.-Almeida hace 10 años
padre
commit
13b88673a2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      gin.go

+ 1 - 1
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
 				}