title: Golang negroni and http.NewServeMux() issue
body: <p>I am running a server with below code:</p>
  
  <pre><code>// Assuming there is no import error
    mux := http.NewServeMux()
    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
    http.Error(w, "File not found", http.StatusNotFound)
    })
  
    n := negroni.Classic()
    n.Use(negroni.HandlerFunc(bodmas.sum(4,5)))
    n.UseHandler(mux)
    n.Run(":4000" )
  </code></pre>
  
  <p>It works perfectly fine.</p>
  
  <p>But when I wrap <code>bodmas.sum</code> with another <code>http handler</code> I always get "File not found." The flow does not go to this route.</p>
  
  <pre><code>  mux := http.NewServeMux()
    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
      http.Error(w, "File not found", http.StatusNotFound)
    })
  
    n := negroni.Classic()
    n.Use(negroni.HandlerFunc(wrapper.RateLimit(bodmas.sum(4,5),10)))
    n.UseHandler(mux)
    n.Run(":" + cfg.Server.Port)
  }
  </code></pre>
  
  <p><code>wrapper.RateLimit</code> is define as below. This works as expected when tested separately:</p>
  
  <pre><code>func RateLimit(h resized.HandlerFunc, rate int) (resized.HandlerFunc) {
      :
      :
    // logic here
  
      rl, _ := ratelimit.NewRateLimiter(rate)
  
      return func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc){
          if rl.Limit(){
              http.Error(w, "Gateway Timeout", http.StatusGatewayTimeout )
          } else {
               next(w, r)
           }
      }
  }
  </code></pre>
  
  <p>There is no error.
  Any suggestions about this behavior ? 
  How to make it work ?</p>