Skip to content

Commit

Permalink
fix: go cases don't flow automatically :)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Oct 13, 2022
1 parent adf4962 commit efc2a7f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,11 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
carVersion := formatParams["version"]
i.serveCAR(r.Context(), w, r, resolvedPath, contentPath, carVersion, begin)
return
case "application/vnd.ipld.dag-json":
case "application/json":
case "application/vnd.ipld.dag-json", "application/json":
logger.Debugw("serving dag-json", "path", contentPath)
i.serveCodec(r.Context(), w, r, resolvedPath, contentPath, begin, responseFormat, uint64(mc.DagJson))
return
case "application/vnd.ipld.dag-cbor":
case "application/cbor":
case "application/vnd.ipld.dag-cbor", "application/cbor":
logger.Debugw("serving dag-cbor", "path", contentPath)
i.serveCodec(r.Context(), w, r, resolvedPath, contentPath, begin, responseFormat, uint64(mc.DagCbor))
return
Expand Down

0 comments on commit efc2a7f

Please sign in to comment.