diff --git a/gin.go b/gin.go index ed8b6dad75..2b05b71d6a 100644 --- a/gin.go +++ b/gin.go @@ -583,10 +583,12 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { // Disclaimer: You can loop yourself to deal with this, use wisely. func (engine *Engine) HandleContext(c *Context) { oldIndexValue := c.index + oldHandles := c.handlers c.reset() engine.handleHTTPRequest(c) c.index = oldIndexValue + c.handlers = oldHandles } func (engine *Engine) handleHTTPRequest(c *Context) {