From 5edb93d5535ecd3c0d9153be3da80c0a715fbc4f Mon Sep 17 00:00:00 2001 From: moonpanda Date: Tue, 11 Jun 2019 10:35:08 +0800 Subject: [PATCH] Update gin.go if use HandleContext ,c.index is new index .if use old ,same func well be run reduplicate --- gin.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/gin.go b/gin.go index 220f0401..69166a72 100644 --- a/gin.go +++ b/gin.go @@ -358,11 +358,8 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { // This can be done by setting c.Request.URL.Path to your new target. // Disclaimer: You can loop yourself to death with this, use wisely. func (engine *Engine) HandleContext(c *Context) { - oldIndexValue := c.index c.reset() engine.handleHTTPRequest(c) - - c.index = oldIndexValue } func (engine *Engine) handleHTTPRequest(c *Context) {