Giteabot 1 year ago committed by GitHub
parent
commit
e7de2fc136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      modules/lfs/http_client.go
  2. 3
      modules/lfs/shared.go

1
modules/lfs/http_client.go

@ -211,6 +211,7 @@ func createRequest(ctx context.Context, method, url string, headers map[string]s @@ -211,6 +211,7 @@ func createRequest(ctx context.Context, method, url string, headers map[string]s
req.Header.Set(key, value)
}
req.Header.Set("Accept", AcceptHeader)
req.Header.Set("User-Agent", UserAgentHeader)
return req, nil
}

3
modules/lfs/shared.go

@ -15,7 +15,8 @@ const ( @@ -15,7 +15,8 @@ const (
// MediaType contains the media type for LFS server requests
MediaType = "application/vnd.git-lfs+json"
// Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
UserAgentHeader = "git-lfs"
)
// BatchRequest contains multiple requests processed in one batch operation.

Loading…
Cancel
Save