Skip to content

Commit

Permalink
Fix lfs migration (go-gitea#32812) (go-gitea#32818)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot and hiifong authored Dec 13, 2024
1 parent 4fe19fc commit e7de2fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/lfs/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion modules/lfs/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e7de2fc

Please sign in to comment.