瀏覽代碼

Merge pull request #363 from error10/patch-1

RedirectTrailingSlash has no effect unless RedirectFixedPath is set
Manu Mtz.-Almeida 10 年之前
父節點
當前提交
13b88673a2
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
 				}