code: func (i Internal) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
  
  	// Internal location requested? -> Not found.
  	for _, prefix := range i.Paths {
  		if httpserver.Path(r.URL.Path).Matches(prefix) {
  			return http.StatusNotFound, nil
  		}
  	}
  
  	// Use internal response writer to ignore responses that will be
  	// redirected to internal locations
  	iw := internalResponseWriter{ResponseWriter: w}
  	status, err := i.Next.ServeHTTP(iw, r)
  
  	for c := 0; c < maxRedirectCount && isInternalRedirect(iw); c++ {
  		// Redirect - adapt request URL path and send it again
  		// "down the chain"
  		r.URL.Path = iw.Header().Get(redirectHeader)
  		iw.ClearHeader()
  
  		status, err = i.Next.ServeHTTP(iw, r)
  	}
  
  	if isInternalRedirect(iw) {
  		// Too many redirect cycles
  		iw.ClearHeader()
  		return http.StatusInternalServerError, nil
  	}
  
  	return status, err
  }
docs: // ServeHTTP implements the httpserver.Handler interface.