code: func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
  	if !r.skipClean {
  		path := req.URL.Path
  		if r.useEncodedPath {
  			path = req.URL.EscapedPath()
  		}
  		// Clean path to canonical form and redirect.
  		if p := cleanPath(path); p != path {
  
  			// Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query.
  			// This matches with fix in go 1.2 r.c. 4 for same problem.  Go Issue:
  			// http://code.google.com/p/go/issues/detail?id=5252
  			url := *req.URL
  			url.Path = p
  			p = url.String()
  
  			w.Header().Set("Location", p)
  			w.WriteHeader(http.StatusMovedPermanently)
  			return
  		}
  	}
  	var match RouteMatch
  	var handler http.Handler
  	if r.Match(req, &match) {
  		handler = match.Handler
  		req = setVars(req, match.Vars)
  		req = setCurrentRoute(req, match.Route)
  	}
  
  	if handler == nil && match.MatchErr == ErrMethodMismatch {
  		handler = methodNotAllowedHandler()
  	}
  
  	if handler == nil {
  		handler = http.NotFoundHandler()
  	}
  
  	handler.ServeHTTP(w, req)
  }
docs: // ServeHTTP dispatches the handler registered in the matched route.
  //
  // When there is a match, the route variables can be retrieved calling
  // mux.Vars(request).