diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 07d0c59e1..c67b56ad0 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -395,6 +395,10 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam return } } + // Strip the encoding from the HTML Content-Type header and let the + // browser figure it out. + // + // Fixes https://github.com/ipfs/go-ipfs/issues/2203 if strings.HasPrefix(ctype, "text/html;") { ctype = "text/html" }