From 577421691b5bca38b9116eb36efcfc9b1dfe2043 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 20 Dec 2023 19:54:34 +0800 Subject: [PATCH] Add missing head of lfs client batch (#28550) ref https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#git-lfs-batch-api --- modules/lfs/http_client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lfs/http_client.go b/modules/lfs/http_client.go index de0b1e4fede..41774733623 100644 --- a/modules/lfs/http_client.go +++ b/modules/lfs/http_client.go @@ -79,7 +79,10 @@ func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Poin return nil, err } - req, err := createRequest(ctx, http.MethodPost, url, map[string]string{"Content-Type": MediaType}, payload) + req, err := createRequest(ctx, http.MethodPost, url, map[string]string{ + "Content-Type": MediaType, + "Accept": MediaType, + }, payload) if err != nil { return nil, err }