Skip to content

Commit

Permalink
fix: accept 'Accept: application/x-tar' header
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Oct 3, 2022
1 parent eacbc68 commit e44423c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e44423c

Please sign in to comment.