From e44423c24de9aabdb4f88c63e0498131fe717c53 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 3 Oct 2022 13:50:10 +0200 Subject: [PATCH] fix: accept 'Accept: application/x-tar' header --- core/corehttp/gateway_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 3f5b74c3db4..4fb9d595c76 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -876,7 +876,7 @@ func customResponseFormat(r *http.Request) (mediaType string, params map[string] // We only care about explicit, vendor-specific content-types. for _, accept := range r.Header.Values("Accept") { // respond to the very first ipld content type - if strings.HasPrefix(accept, "application/vnd.ipld") { + if strings.HasPrefix(accept, "application/vnd.ipld") || strings.HasPrefix(accept, "application/x-tar") { mediatype, params, err := mime.ParseMediaType(accept) if err != nil { return "", nil, err