github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/pkg/httputil/request.go (about)

     1  package httputil
     2  
     3  import (
     4  	"context"
     5  	"errors"
     6  	"net/http"
     7  )
     8  
     9  func IsRequestCanceled(r *http.Request) bool {
    10  	return errors.Is(r.Context().Err(), context.Canceled)
    11  }