Skip to content

Commit 221934a

Browse files
committed
Update
1 parent 56c23cb commit 221934a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/lfs/shared.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ import (
99
"runtime"
1010
"time"
1111

12-
"code.gitea.io/gitea/modules/setting"
1312
"code.gitea.io/gitea/modules/util"
1413
)
1514

1615
const (
1716
// MediaType contains the media type for LFS server requests
1817
MediaType = "application/vnd.git-lfs+json"
19-
// Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
18+
// AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
2019
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
2120
)
2221

23-
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client. Some lfs servers will check this
24-
var UserAgentHeader = fmt.Sprintf("git-lfs/%s (Gitea; %s %s; %s)", setting.AppVer, runtime.GOOS, runtime.GOARCH, runtime.Version())
22+
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
23+
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
24+
// Some lfs servers will check this
25+
var UserAgentHeader = fmt.Sprintf("git-lfs/3.6.0 (Gitea; %s %s; %s)", runtime.GOOS, runtime.GOARCH, runtime.Version())
2526

2627
// BatchRequest contains multiple requests processed in one batch operation.
2728
// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#requests

0 commit comments

Comments
 (0)